Jquery multiple ID selector doesn't work -
i tried script didn't work second given id; both element inside iframe
<script> jquery(document).ready(function(){ $("#subscribe_newsletter, #close_bar").each(function(){ $(this).click(function(){ alert("with each"); $.cookie( "nl_cookie" , 1 , { path: "/" } ); $("#footer_accept_newsletter").hide("slow"); }); }); cookievalue = $.cookie("nl_cookie" , { path: "/" }); if(!cookievalue){ $("#footer_accept_newsletter").removeclass("hidden"); } }); </script>
i tried following code no success;
$("#subscribe_newsletter, #close_bar").click(function(){ $.cookie( "nl_cookie" , 1 , { path: "/" } ); $("#footer_accept_newsletter").hide("slow"); });
it work me
$(document).ready(function(){ $("#segement1, #segement2, #segement3").click(function(){ alert($(this).attr("id")); }); });
check fiddle
Comments
Post a Comment