Saturday, 15 June 2013

javascript - jQuery unexpected token error = -


Get me the toggle = function on "unexpected token =" function (EVT ) { Sample the code below. I have done many posts, but do not think why it is throwing this error.

Any help to point me in the right direction is greatly appreciated.

  & lt; Script type = "text / javascript" & gt; ("Click", toggle nave); Function = $ (this), $ (document) .ready (function ($) {$ ("# nav" gt; li & gt; a) ("class"); $ ("#nava"). RemoveClass ("btn1btn2btn3btn4btn5btn6btn7"). Adclass (clicked); evt.preventDefault ();}}); & Lt; / Script & gt;    

Try this type

  var toggleNav = Function (evt) {var click = $ (this). Parent (). Attr ("class"); $ ("#nava"). RemoveClass ("btn1btn2btn3btn4btn5btn6btn7") adeclass ('clicked'); Evt.preventDefault (); }   

Or you can call directly

  function toggle nav (evt) {var click = $ (this). Parent (). Attr ("class"); $ ("#nava"). RemoveClass ("btn1btn2btn3btn4btn5btn6btn7") adeclass ('clicked'); Evt.preventDefault (); }   

and also clicked in quote because it is the name of a square

No comments:

Post a Comment