i dont have a clue how i should rewrite this jquery so i can pass parameters into it. i want to pass an id into the function so i place it like, $(".dialog" + id).
i am goin to trigger it with a <a>
$(document).ready(function() {
$(".btnCheck").live("click", function(evt) {
evt.preventDefault();
$(".dialog").dialog({
height: 700,
width: 600,
closeOnEscape: true,
title: 'prev'
}).dialog("open");
});
});
Assuming:
you can do:
You’ll note that instead of using a dynamic class name, I gave the div a class of dialog. To get a specific one, since you will only ever want one (at a time), an ID is a better choice (imho).
thiswithin this event handler refers to the button that was clicked ie the source of the event.