here is my code that open pop on window that name of class is like my input value. it works for my first part in html(PASS is first in my html ocde) but does not work for others. what is the problem?
</div>
</div>
<!---------------- POLL BUTTON DIV(POP-UP)---------------------->
<div id="modal" class="poll">
<div id="content">
</div>
</div>
<!---------------- PASS BUTTON DIV(POP-UP)---------------------->
<div id="modal" class="pass">
<div id="content">
</div>
</div>
<script type="text/javascript">
$(document).ready(function() {
$('#link').click(function(e) { // Button which will activate our modal
var block = $(this +":input").val();
$('.'+block).reveal({ // The item which will be opened with reveal
animation: 'fade', // fade, fadeAndPop, none
animationspeed: 600, // how fast animtions are
closeonbackgroundclick: true, // if you click background will modal close?
dismissmodalclass: 'close' // the class of a button or element that will close an open modal
});
return false;
});
});
</script>