Created
December 15, 2017 07:20
-
-
Save congthien/00c48666a9ea40e37f68dc75bf0e4c5a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function couponModalDetails( ) { | |
$( '.coupon-modal' ).each( function() { | |
var coupon_popup_detail = $(this).find('.coupon-popup-detail'); | |
var show_detail = $(this).find('.show-detail a'); | |
coupon_popup_detail.show(); | |
$(show_detail).click( function() { | |
if ( $(show_detail).hasClass('show-detail-on') ) { | |
coupon_popup_detail.show(); | |
$(this).removeClass('show-detail-on'); | |
$(this).find('i').removeClass('up').addClass('down'); | |
} else { | |
coupon_popup_detail.hide(); | |
$(this).addClass('show-detail-on'); | |
$(this).find('i').removeClass('down').addClass('up'); | |
} | |
return false; | |
} ); | |
} ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment