php - Create a toggle close button -
can remove fancy below script , create event of toggle close button on it. script using on website in listings, wanna create toggle for multiple id's
$("a.fmailto").click(function(event){  var nr = jquery(this).attr("id").substr(6); var arr = nr.split("_"); var user_id = arr[0]; var listing_id = arr[1]; $.fancybox({     'width' : 630,     'height' : 600,     'transitionin' : 'none',     'transitionout' : 'none',     'margin' : '0',     'padding' : '0',     'titleshow' : false,     'type' : 'iframe',     'href' : '{/literal}{$live_site}{literal}/mailto.php?id='+user_id+'&ad_id='+listing_id     }); });      
<div>toggle me</div> <a onclick="$('div').toggle();"></a>   or literaly:
$(function(){ $('a').on('click',function(){ $('div').toggle();  });  });      
Comments
Post a Comment