When you create a Jquery UI accordian you get a bunch of headers, that when you click them a div opens. However, I would like to preform an additional action upon clicking the header.
How do i do this?
Any ideas?
Thanks!
Javascript
$("#CreateNewUserHeader").click(function() {
alert("test");
});
html
<h3 id = "CreateNewUserHeader"><a >Create New User</a></h3>
<div>some stuff</div>
You need to wrap your code in ready
handler:
$(function(){
$("#CreateNewUserHeader").click(function() {
alert("test");
});
});
Also make sure that you do not assign same id to more than one elements.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With