-1
<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

2
  • 2
    Note that jQuery is Javascript. What you can do with Javascript, you can do with jQuery. Commented Sep 25, 2010 at 16:37
  • And to be more precise: jQuery is a JavaScript framework. Commented Sep 25, 2010 at 16:47

1 Answer 1

3

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.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.