<html>
<head>
<script type="text/javascript">
function display(id)
{
// open jquery modal window using jquery UI
}
</script>
</head>
<body>
</body>
</html>
I want to open jquery modal window using jquery UI whenever the function display is called using normal javascript function call .
I can use .diolog function of jquery UI , but how to call it from within javascript function ?
Thanks
JasCav
34.6k21 gold badges117 silver badges175 bronze badges
-
2Note that jQuery is Javascript. What you can do with Javascript, you can do with jQuery.JasCav– JasCav2010年09月25日 16:37:27 +00:00Commented Sep 25, 2010 at 16:37
-
And to be more precise: jQuery is a JavaScript framework.Marcel Korpel– Marcel Korpel2010年09月25日 16:47:30 +00:00Commented Sep 25, 2010 at 16:47
1 Answer 1
You can just use a selector and call .dialog(), like this:
function display(id)
{
$("#"+id).dialog();
}
This uses the passed id for the #ID selector then just calls .dialog() for that element.
answered Sep 25, 2010 at 16:36
Nick Craver
631k138 gold badges1.3k silver badges1.2k bronze badges
Sign up to request clarification or add additional context in comments.
Comments
lang-js