Questions tagged as 'javascript'

2
answers

What is the difference from ON to ONE in Jquery

I'm dealing with some common optimizations in my system and I found a situation that intrigued me, every time I double clicked on the table and called a function to bring the complementary data of the client it doubled the amount of requests to...
asked by 08.09.2015 / 15:50
1
answer

List Javascript objects in a table

Good afternoon. I have an object: var relatorios = [ { "Data": "28/08/2015", "Descricao": "Visita a Cliente", "Classificacao": "Class.2", "Valor": "R$435,00", "Verba": "RH", "Comentario": "Cliente A" }, { "Data": "15/05/2013",...
asked by 05.09.2015 / 21:46
1
answer

Sum of values Nodejs + Mongoose

I need to sum the values stored in a variable in the database. I have a form and I want to know the total value generated in a variable. Then I did the following: _.each(cliente.data, function (data) { fo...
asked by 01.09.2015 / 14:45
2
answers

Change CSS by scrolling the page

I was wondering how to swap a page's CSS after it gets scrolling out of its default location. An example of a site that uses this is Deviantart. This TODAY BROWSEWHAT'S HOTUNDISCOVEREDDAILY DEVIATIONS menu is suddenly fixed once the page...
asked by 30.08.2015 / 21:11
3
answers

JavaScript to extract accents and special characters does not work the same way in all browsers?

I have the following JavaScript: function validaCaracteres(strToReplace) { strSChar = "áàãâäéèêëíìîïóòõôöúùûüçÁÀÃÂÄÉÈÊËÍÌÎÏÓÒÕÖÔÚÙÛÜÇ"; strNoSChars = "aaaaaeeeeiiiiooooouuuucAAAAAEEEEIIIIOOOOOUUUUC"; var newStr = ""; for (var i = 0; i < str...
asked by 09.09.2015 / 20:16
1
answer

Fade effect run in jQuery

Well, I'll try to explain the best, what I intend to do: I have a div with the border id, which actually serves as the border. I want to do a jQuery effect, run color-changing, from top to bottom, that is, it's red, then it gets orange, ye...
asked by 06.03.2017 / 20:22
3
answers

Hide the destination URL

In the jquery example the arguments are well identified; url and form parameters. $.ajax({ url: "test.html", }).done(function() { // ... }); I want to know if you have any way to hide the url in ajax or make it difficult to identify the...
asked by 20.08.2014 / 07:27
2
answers

How to remove backslashes (\) and quotation marks (") from a string?

I would like to prevent the use of these characters in a string. I think the most elegant way would be by regular expression, but I do not understand anything about how to put one together. A replace would also help.     
asked by 06.08.2014 / 15:08
1
answer

How do I get indexes of a json with javascript?

For example: var carro = { "modelo": "celta", "ano": 2007 } How can I do a generic function that returns the index names of this json, in this case "model" and "year"? Something like: function(json){ //faz o processo...
asked by 16.03.2017 / 08:57
3
answers

Add and remove class

I have a simple schema to go to class .ativo and remove it and add the class .block then search the #banner1 id and add the class .ativo and remove the class .block But it's not working, look there: $(".bo...
asked by 21.09.2014 / 04:47