Questions tagged as 'jquery'

3
answers

Check if a div contains a number

I have a paragraph that contains multiple links, alternating between words or numbers. I need to do the following check: if the link within the paragraph is any text, it will not do anything with the text, but if this link has a number, it will...
asked by 25.02.2014 / 18:39
2
answers

Is it possible to apply push technology?

I have a system, in which it displays database files, in list form. I query the database every 5 seconds to see if there are new files, and if it has it shown to the user, using AJAX. Why this? To avoid updating the page at all times, to s...
asked by 08.09.2014 / 20:57
1
answer

MoneyMask does not work on Device

The Jquery plugin does not work on device , would anyone know how to solve this? The question is this, I looked into why the MoneyMask plugin did not work inside device and found that the plugins they use the Keydown event that...
asked by 02.02.2015 / 04:00
3
answers

How do I replace on the last occurrence of a character?

I have a loop that assembles strings in this format: var Sabor[0] = "Mussarela, Calabresa, Cebola"; var Sabor[1] = "Mussarela, Presunto, Calabresa, Tomate, Ovos, Pimentão, Cebola"; But I would like to replace the last comma with an "e"....
asked by 30.05.2014 / 01:47
2
answers

SetTimeOut and server traffic

I have a question. I am implementing setTimeOut() in a comments application, where every 3 seconds the div is refreshed so that new comments appear automatically without the need for refresh . It is working correctly: setTimeout(listCo...
asked by 11.01.2018 / 14:12
3
answers

How to make the page load only after getJSON returns?

I'm retrieving a list in JSON using the jQuery.getJSON function: http=jQuery.getJSON(url); This code returns the object perfectly, but the request takes longer than the loading time of the page where I will insert the data. This way,...
asked by 11.09.2014 / 18:02
6
answers

How to extract a variable from within a function

Assuming I use the following function in .js ... and inside it has some variables. $(document).on("load", function(){ var Variavel1= "um"; var Variavel2= "dois"; var Variavel3= "tres"; var Variavel4= "quatro"; }) How do I us...
asked by 27.08.2015 / 19:23
2
answers

Passing JS values to another HTML page

Is it possible for javascript to pass a variable whether it is global or not from an HTML page to another HTML? index.html recibaria.html Type, some way to save this value and move it to the other page without having to use php as a...
asked by 19.07.2015 / 17:58
2
answers

What is the inverse of: visible in jQuery?

The :visible selector in jQuery is used to search for an element when it is visible. Example: $(this).find('li:visible').addClass('color-red'); However, when trying to search for invisible elements, we do not have the :invisibl...
asked by 11.08.2015 / 14:29
3
answers

Check if array contains specific character

I need to check if an array has a specific character (this: |). If it contains, this character must be deleted, and the next word that would be after that character (which actually is a separator of items) would be added in the next index. That...
asked by 14.12.2018 / 03:05