Questions tagged as 'jquery'

2
answers

Is it correct to use $ (selector) .not (': visible') here?

I am refactoring the CSS of a system function and to treat the CSS property and not a string I changed this line of code: (from the 1st way was working correctly) var ultimaMensagem = $("#box-confirm:not([style*='display: none;']),#box-erro:n...
asked by 01.07.2015 / 16:38
1
answer

How to put one element before another with jQuery?

How to make a certain HTML before another div? I tried using prepend but it poe at the beginning inside the div but I want it to put above / before and out of it, using prepend it looks like this: <div class="pai"><div&g...
asked by 27.06.2015 / 00:06
1
answer

Scope of variables within $ .getJSON

The variable role gets a new value in every Loop , when it is inside $.getJSON it takes the second value of the array and does not change anymore. There are two console.log(); in the code, I put their return next to it...
asked by 13.03.2014 / 19:00
1
answer

jQuery unique, difference in Chrome and Firefox?

I'm having an unexpected behavior with unique of jQuery. The following command: var x = [1,2,1,2]; var y = $.unique(x); document.write(y); In Chrome it results in 1,2 (which is correct), but in Firefox it appears 1,2,...
asked by 14.05.2014 / 16:47
1
answer

How to use fadeIn () with an append ()?

How to add the fadeIn () effect, along with an append (). EXAMPLE     
asked by 19.02.2014 / 23:36
2
answers

How to sort a JSON in descending order?

I have a JSON value that I want to sort it in descending order (I think in the example you will understand). Example: var json = { 'um': { 'cont': '5' }, 'dois': { 'cont': '10' } ... }; So in this case...
asked by 10.03.2014 / 17:50
2
answers

jQuery switch div background specifies

I need a help with the following problem, I have the following HTML, which is part of an accordion <div id="accordion2"> <h3 class="btn-sub-main"><a>Banho</a><div class="seta-btn-sub"></div></h3>...
asked by 17.02.2014 / 19:58
4
answers

Automated tool to join multiple stylesheets (CSS) in 1 only and to join Scripts (JS) in 1 Sheet only

I searched the internet for ways to join Stylesheets CSS and Script Sheets JS in an automated way, but did not work well. I have about 17 Style Sheets and 15 Scripts, if I do it manually I will be "crazy" and it will take a...
asked by 24.07.2014 / 03:13
2
answers

Button that when clicked shows only the content of a certain class

Hello, I'm creating a Javascript system, where I need a button to show only the paragraphs with a given class in a div with hidden content. Example: <button id="btn1">Abre classe1</button> <div id="conteudo"> <p...
asked by 24.07.2014 / 23:14
2
answers

Table does not break line

This is the following I am using a site table: DataTables and what is happening is as follows: AsyoucanseethetextgetsallinlinewhichmakesitdifficulttoreadbecauseyouhavetoscrollmydoubtishowdoImakeautomaticparagraphsorthatthetablebreakstheline.&...
asked by 23.12.2017 / 03:30