I’m trying to create multiple instances of the simple modal popup on a single page.
When clicking a button with the class “popup_button” all popups with the class “popup_content” are opened at the same time
http://jsfiddle.net/A96su/
$('.popup_button').click(function (e) {
$('.popup_content').modal({
closeClass: "popup_close",
closeHTML: "<a href='#'>Close</a>",
position: [36,238]
});
return false;
});
I was trying to work with closest(), but the plugin still opens all instances of “popup_content” at the same time
http://jsfiddle.net/A96su/1/
$('.popup_content').closest('.popup_button').click(function (e) {
$('.popup_content').modal({
closeClass: "popup_close",
closeHTML: "<a href='#'>Close</a>",
position: [36,238]
});
return false;
});
I would appreciate your help!
-n-
Draw your attention on this line:
$('.popup_content', this)