Most voted "addclass" questions
Jquery method that serves to add a class to the selected element, it does not replace the current classes of the element, only increments one or more classes.
Learn more…11 questions
Sort by count of
-
7
votes4
answers147
viewsIs there any way to decrease this script without losing functionality?
<script src="http://ajax.aspnetcdn.com/ajax/jQuery/jquery-2.1.4.min.js"></script> <script> $("div#contenthead div.left span").hover(function() { $("div#contenthead…
-
4
votes1
answer164
viewsHow to add a class to multiple cached elements at once?
In jQuery, we can add CSS classes to multiple elements, but with the element already cached in a variable, as we can perform the same operation? Example: // adicionar classe a ambos os elementos…
-
3
votes2
answers143
viewsClass is not embedded in DOM(Jquery)
Following code: <script> $(document).ready(function() { $("#inicio").hover(function() { $("#inicio").addClass("fogo"); $("#inicio").removeClass("fogo"); }); }); </script> And the HTML:…
-
2
votes1
answer700
viewsjQuery addClass in scroll
I got the code down and I’m trying to get the elements li stay with the class active depending on the scroll (effect Parallax), everything works fine (click functions for scroll) except that. If you…
-
2
votes3
answers367
viewsStop Menu scroll in certain resolution
I have a drop down menu along with the scroll. I used Jquery to add css attributes to make this happen. I don’t want this to happen when the site is less than 768px wide. That’s when it stands still…
-
2
votes2
answers70
viewsProblem with a Javascript function
I have a problem here and I don’t know how to solve, in theory, in my role below 768px was to add the class .navbar-inverse the tag nav, and above 768px is to remove it if it exists, but nothing…
-
1
votes1
answer351
viewsAdd class to on scroll element
I have a site that in css, have these statements for the body: body { background: #fab52d; font-family: Montserrat, Helvetica, Arial, sans-serif; font-size: 1.6rem; color: #FFFFFF; overflow: hidden;…
-
0
votes1
answer48
viewsaddClass() to an object via an external link
I need to create a click() function for 8 links that are in one pagina X, each link will take me to a specific slide in a pagina Y. Slide is active when it is with Class selected, then my idea is…
-
0
votes2
answers313
viewsaddClass to an element above the hierarchy
Here’s a demonstration of what I’m trying to do.. HTML <div id="conteudo"> <div id="inner" class="move"> <div class="col-md-10"><a class="botao"…
-
0
votes2
answers228
viewsMobile site content with jQuery click
I would like to apply the following function in a project. When clicked on the button (that applied will be the menu button) the entire content of the site that is inside the div CONTEUDO-MOVEL…
-
0
votes1
answer118
viewsHow do I switch a class of buttons that trigger a player to appear and hide?
I have 3 buttons in Link format with the classes: . icon-play, . icon-pause and . icon-download, I want to change the play class with pause, as well as the reverse without influencing the download…