I have a script from jquery that executes a pop up from a button. I want to use a href link instead but can’t figure out the syntax to do so. Going through the jQuery documentation I can’t find anything specifying what I am try to do.
the link is:<a href="#" class="connect_link" id="create-user">Join the mailling List</a>
The current code i have is:$( "#create-user" )
.button()
.click(function() {
$( "#dialog-form" ).dialog( "open" );
});
I assumed that if you changed .button() to .link() it would work but no such luck.
Thanks guys.
You should be able to do:
And it’ll work.
$("#create-user")selects your element, and then doing.click()binds the click action to that element.