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

sonata admin - how to add ManyToOne property field in configureListfield in sonataAdmin -

wpf - ControlTemplate with changes for every class -

python - how we can use ajax() in views.py in django? -