Questions tagged as 'addclass'

4
answers

Can you reduce 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 div.topmenu").addClass("displayblock");}); $("div#con...
asked by 11.11.2015 / 16:41
1
answer

How 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, how can we perform the same operation? Example: // adicionar classe a ambos os elementos $('#myEle, #anotherEle').addClass('johnDoe')...
asked by 16.12.2013 / 17:24
2
answers

The class is not built into the DOM (JQuery)

Next code: <script> $(document).ready(function() { $("#inicio").hover(function() { $("#inicio").addClass("fogo"); $("#inicio").removeClass("fogo"); }); }); </script> And the HTML: <li><a id="inicio">Inicio</a&...
asked by 31.12.2014 / 21:59
2
answers

Problem with a JavaScript function

I have a problem here and I do not know how to solve, in theory, my function below 768px was to add the class .navbar-inverse to the tag nav , and above 768px is to remove it case exists, but nothing happens. Edit:...
asked by 14.04.2015 / 15:47
3
answers

Stop scroll menu in a certain resolution

I have a menu that goes down along with the scroll. I used Jquery to add css attributes for this to occur. I do not want this to happen when the site has less than 768px of width. So let it be stopped Media queries did not help me resolve bec...
asked by 09.02.2015 / 14:17
1
answer

jQuery addClass in scroll

I have the code below and I'm trying to get the li elements to get with the active class depending on scroll (parallax effect ), everything works well (click functions for the scroll) except that. If you know better, please share...
asked by 09.04.2014 / 18:21
1
answer

Add class to element on scroll [duplicate]

I have a website 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; } In the followi...
asked by 01.02.2017 / 18:17
2
answers

addClass to an element at the top of 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" href="#">botao</a></div> <div class=...
asked by 14.02.2015 / 20:11
2
answers

Mobile site content with jQuery click

I would like to apply the following function in a project. When clicked on the button (which applied, it will be the menu button) the entire content of the site that is inside the CONTEUDO-MOVEL div should go to the left hiding a part...
asked by 19.02.2015 / 14:21
1
answer

addClass () to an object via an external link

I need to create a click () function for 8 links that are in pagina X , each link will take me to a specific slide in a pagina Y . The slide is active when it is with Class selected , so my idea is as follows: The user cl...
asked by 29.04.2016 / 04:09