Questions tagged as 'jquery'

1
answer

Error when calling ajax call

Hello, I'm trying to make the following ajax call: function salvarAposta() { var nomeApostador = $('#nomeApostador').val(); var jogosSelecionados = $('#tabelaFinalizacao tbody tr'); var valorAposta = parseFloat($('#valor_aposta')....
asked by 18.01.2017 / 17:27
1
answer

Add or reduce a value in .top when clicking the link for ID

I have a jQuery function that does a smooth scrolling on the page by clicking the ID link. $(function() { $('a[href*="#"]:not([href="#"])').click(function() { if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'')...
asked by 19.01.2017 / 06:14
1
answer

Use a focus for multiple fields.

Hello, I created a function to validate cnpj in my form and I need to use a focus () for the cursor to stay in the input when the user enters the wrong cnpj, but there are 3 different fields of cnpj. I have done it in several ways, but he only a...
asked by 28.11.2016 / 12:47
1
answer

jQuery Ajax generating image error

I have the following code: <table class="table" id="historico"> <thead> <tr> <th>Hora</th> <th>Música</th> </tr> </thead> <tbody></tbody> </table>...
asked by 26.11.2016 / 15:22
1
answer

Run script after 20 seconds

I have a script but would like to make a change in it so that it appears to the user after 20 seconds browsing the site. I tried to make the change in setTimeout, but it did not resolve because it appears immediately without following the setTim...
asked by 30.11.2016 / 02:42
1
answer

Accept string with letters, numbers, or periods

I'm using the Jquery Validate plugin to validate facebook usernames, and by default it can have letters, numbers, and periods. Ex: joao, joao22, joao.maluco22 How to validate this with jQuery Validate? The default methods are as follows:...
asked by 29.11.2016 / 02:25
1
answer

Div with load overlay

Hello, I have the following div and I made a code in jquery so when I trigger it through an event, it appears, but I want to style it in a way that the div overlays the entire contents of my page, with a black background with a certain opa...
asked by 29.11.2016 / 13:43
1
answer

how to format variable with jquery mask

I use the jQuery Mask Plugin v1.13.4 plugin I have a div where I enter a value as follows: $('#v_pg').text('PAGA R$ ' + valor_pago); Use Jquery to update the value inside the div. But I wanted it to be formatted by the Mask as follows:...
asked by 30.11.2016 / 14:00
1
answer

How to do the animated scroll effect automatically?

This site that I found link has a super cool effect that I would like to make a similar on my site:   When you scroll down, item 01 changes to 02. Consequently, the content changes. I know I should use Javascript and CSS, but I can not...
asked by 30.11.2016 / 13:11
1
answer

How to check if a select already has a selected option?

I have a page where there are some selects (representing the functions of the users, which can be: Leader, Participant or For Knowledge). There are some business rules: If the user is selected as LEADER, he / she can not have any other role...
asked by 29.11.2016 / 04:11