javascript - Set text state to active on page load -


I want it when the page loads the 'Instagram' text, already Color is given, then you can switch between others, it does not know how to 'active' onload or how to set something ($.) ($ (This) .addClass ("hover");}, function () {$ (This) .removeClass ("hover");}); $ (".filter") (function () {$ (".filter"). RemoveClaim ("active"); $ (this) .removeClass ("hover"). AddClass ("active");}) ;

Activate the class in HTML

  Lt; Div class = "button one" & gt; & Lt; A href = "#" class = "active filter" & gt; Instagram & lt; / A & gt; & Lt; / Div & gt;    

Comments

Popular posts from this blog

c - Mpirun hangs when mpi send and recieve is put in a loop -

python - Apply coupon to a customer's subscription based on non-stripe related actions on the site -

java - Unable to get JDBC connection in Spring application to MySQL -