Problem with button click event in jquery -
I'm using jQuery Click Button to click on div but I do not know why it is not working. .
HTML: Javascript: jsfiddle demo: I can not find any results on the button click. 2 problems: Use ( with jQuery instances is a great one and one.
& lt; Input type = "button" id = "addmoresg" value = "add more" name = "button" & gt; & Lt; Div id = "addsg" style = "display: none" & gt; & Lt ;! - More HTML here - & gt; & Lt; / Div & gt;
$ (document) .ready (function () {$ ('. Addmoresg'). Do (function () {$ ('. Addsg'). Show ("slow");});});
.addmoresg ) instead of (
#addmoresg ) in your elements only
id S, not
class es:
input type = "button" id = "addmoresg" value = "add more" name = "button" & gt;
$ ('. Addmoresg)' elements to
class = "addmoresg" , such as
& Lt; Input type = "button" class = "addmoresg" value = "add more" name = "button" & gt;
Comments
Post a Comment