javascript - hasClass jQuery isn't working -


I am working on a navigation system where the left and right arrows extend the LIs.

  & lt; a href = "#" square = "icon-arrow-left active" & gt; & Lt; / A & gt; & Lt; Ul & gt; & Lt; Li class = "contracted" & gt; & Lt; A href = "#" & gt; 1 & lt; / A & gt; & Lt; / li & gt; & Lt; li class = "extended" & gt; & Lt; A href = "#" & gt; 2 & lt; / A & gt; & Lt; / li & gt; & Lt; li class = "active placement" & gt; & Lt; A href = "#" & gt; 3 & lt; / A & gt; & Lt; / li & gt; & Lt; li class = "extended" & gt; & Lt; A href = "#" & gt; 4 & lt; / A & gt; & Lt; / li & gt; & Lt; Li class = "contracted" & gt; & Lt; A href = "#" & gt; 5 & ​​lt; / A & gt; & Lt; / li & gt; & Lt; / Ul & gt; & Lt; A href = "#" square = "icon icon-arrow-right active" & gt; & Lt; / A & gt; When the fist is 'extended', 'icon-arrow-left' should be 'inactive' and when the last le 'extended' icon should be 'icon-arrow-correct'.  

I tried to use it, but not working

  if ($ ('li: first-child'). Haclas ('active placement')) { $ ('Atre (' square ',' inactivated ')}   

is

Comments

Popular posts from this blog

c# - Roxy file manager in MVC doesn't accept session path -

jsp - No mapping found for HTTP request with URI with annotation config Spring MVC and Jetty -

java - Ajax call to jsp and jsp redirecting to further jsp -