How would you utilize the jQuery simple modal box, for multiple instances on one page, with unique content for each description??
Would I use the .this function?
html:
<div id='class-descriptions'>
<a href='#' class='basic'>Description 1</a>
<a href='#' class='basic'>Description 2</a>
<a href='#' class='basic'>Description 3</a>
<a href='#' class='basic'>Description 4</a>
</div>
<div id="description1">description 1 content</div>
<div id="description1">description 2 content</div>
<div id="description1">description 3 content</div>
<div id="description1">description 4 content</div>
js:
jQuery(function ($) {
// Load dialog on page load
//$('#description').modal();
// Load dialog on click
$('#class-descriptions .class').click(function (e) {
$('#description1').modal();
return false;
});
});
The first thing that you need to know it’s fix the html code, you cannot use the same id for the divs, also you need to bind in some way the element
awith the elementdivwhich have the contentAssuming that each element
ait’s refered to eachdivthat would be a modal, maybe the code should be like this