javascript - Display div on click with jQuery -
i want create <div>
(display: none) when click on button, <div>
should show itself.
but error:
parse error: syntax error, unexpected '(', expecting t_variable or '$'
when use code:
$('body').click(function () { $('#editor_form').hide(); }); $('#buttondiv').click(function (e) { $('#editor_form').sho`enter code here`w(); e.stoppropagation(); });
the error got php 1 writing javascript (with jquery).
your javascript code need placed inside <script></script>
tag on html file or directly on js file included in html file.
maybe if have html , php on same file, forgot php closing tag ?>
before starting write js code.
moreover, careful, have placeholder cause error on line :
$('#editor_form').sho`enter code here`w();
Comments
Post a Comment