mirror of
https://github.com/10h30/ultimatemember.git
synced 2026-07-11 18:56:10 +09:00
- fixed privacy policy toggler
This commit is contained in:
+12
-12
@@ -1,22 +1,22 @@
|
||||
(function ( $ ) {
|
||||
'use strict';
|
||||
|
||||
$(document).on('click', "a.um-toggle-gdpr" ,function() {
|
||||
$( document ).on( 'click', 'a.um-toggle-gdpr', function ( e ) {
|
||||
let $a = jQuery( e.currentTarget );
|
||||
let $area = $a.closest( '.um-field-area' );
|
||||
let $content = $area.find( '.um-gdpr-content' );
|
||||
|
||||
var me = jQuery(this);
|
||||
|
||||
$( ".um-gdpr-content" ).toggle( "fast", function() {
|
||||
if( $( ".um-gdpr-content" ).is(':visible') ){
|
||||
me.text( me.data('toggle-hide') );
|
||||
if ( $content.is( ':visible' ) ) {
|
||||
$area.find( 'a.um-toggle-gdpr' ).text( $a.data( 'toggle-show' ) );
|
||||
$content.hide().find( 'a.um-toggle-gdpr' ).remove();
|
||||
if ( $a.length ) {
|
||||
$a.get( 0 ).scrollIntoView();
|
||||
}
|
||||
|
||||
if( $( ".um-gdpr-content" ).is(':hidden') ){
|
||||
me.text( me.data('toggle-show') );
|
||||
} else {
|
||||
$area.find( 'a.um-toggle-gdpr' ).text( $a.data( 'toggle-hide' ) );
|
||||
$content.show().prepend( $a.clone() );
|
||||
}
|
||||
|
||||
} );
|
||||
|
||||
});
|
||||
|
||||
|
||||
})( jQuery );
|
||||
|
||||
Vendored
+1
-1
@@ -1 +1 @@
|
||||
!function(e){"use strict";e(document).on("click","a.um-toggle-gdpr",function(){var t=jQuery(this);e(".um-gdpr-content").toggle("fast",function(){e(".um-gdpr-content").is(":visible")&&t.text(t.data("toggle-hide")),e(".um-gdpr-content").is(":hidden")&&t.text(t.data("toggle-show"))})})}(jQuery);
|
||||
!function(){"use strict";jQuery(document).on("click","a.um-toggle-gdpr",function(e){let t=jQuery(e.currentTarget),g=t.closest(".um-field-area"),o=g.find(".um-gdpr-content");o.is(":visible")?(g.find("a.um-toggle-gdpr").text(t.data("toggle-show")),o.hide().find("a.um-toggle-gdpr").remove(),t.length&&t.get(0).scrollIntoView()):(g.find("a.um-toggle-gdpr").text(t.data("toggle-hide")),o.show().prepend(t.clone()))})}();
|
||||
Reference in New Issue
Block a user