Pass var to jquery from div
Posted
by
user1518202
on Stack Overflow
See other posts from Stack Overflow
or by user1518202
Published on 2012-07-11T15:09:30Z
Indexed on
2012/07/11
15:15 UTC
Read the original article
Hit count: 138
I am using a jquery function to open a dialog box, and I need to be able to change the height and the width of the box. I am wanting to pass it a parameter from within the DIV. I have looked at many different possibilities, but to no avail. Any ideas would be greatly appreciated.
$.fx.speeds._default = 1000;
$(function() {
$("#dialog").dialog({
autoOpen: false,
height: 300,
width: 500,
show: "drop",
hide: "drop"
});
$("#opener").click(function() {
$("#dialog").dialog("open");
return false;
});
});
Here is my Div.
<div id="dialog">
Some text here
</div>
© Stack Overflow or respective owner