Questions tagged as 'jquery'

1
answer

How to compare if the div with event click has a class similar to another selected div?

I have a set of div's with jQuery event click. I'm not sure how to compare the div's clicked if they have the same icon class. I have a div already selected, if the user clicks another div in the same container I want to apply another event if i...
asked by 06.08.2018 / 21:06
1
answer

Rename files in a folder in a sequential way - JavaScript

How would you be able to rename files of the same format but with different names (for example: Images) to a sequential pattern? Example: From titulo-capa.jpg | foto-perfil.jpg | background.jpg To imagem01.jpg | imagem02.jpg | i...
asked by 08.08.2018 / 19:31
1
answer

Ajax request to an API

I'm trying to make the request to a third-party API via the following code: <script src="https://ajax.aspnetcdn.com/ajax/jQuery/jquery-3.3.1.min.js"></script><script>$(function(){$.post({url:url,contentType:"application/json;...
asked by 09.08.2018 / 03:29
2
answers

Replace foreach php with each jquery

I'm using jQuery to print returns from a JSON Web service, the script works normally, but loading the page is very slow, I'm using PHP tags inside my jQuery script, I'd like to use only jQuery and I saw that the each function is for going throug...
asked by 30.08.2018 / 18:50
1
answer

Comparison of arrays or best method to add new elements

I have a webservice in json that returns me to the last people who passed in a certain place. That said, I did the following: I always ask for information about the last person to go to the api. I created in my page in setInterval...
asked by 29.08.2018 / 15:36
1
answer

Sort vector from lowest to highest

PHP: array_push($var, $linha['data']); array_push($var, $linha['data_t']); array_push($var, $linha['data_f']); usort($var);// Adicionei essa linha para tentar formatar as datas da menor pra maior mas retornou o erro Warning...
asked by 29.08.2018 / 22:41
3
answers

Add string with JS in shopping mode [closed]

I'm doing my first freelance, but I'm having trouble because I do not know much about JS. link (Still in process) when I click on buy, a modal appears, which I would like the checkboxes to change the total value to be selected, however I can n...
asked by 31.07.2018 / 22:06
1
answer

Jquery scroll () IE Compatibility

What about people, all right? I have a JQuery scroll () event, but I'm having a compatibility problem with Microsoft Edge (IE), follow the code: $(window).scroll(function(){ var scrollTop = $('html, body').scrollTop(); if(scrollTop &g...
asked by 31.07.2018 / 20:13
1
answer

JQuery HTML Currency Mask (non-input)

Hello. I'm behind a currency mask made in jquery, but applied directly to an html span tag, with a specific class. What else I have found in my searches are the input masks for forms, which is not the case. I ended up getting a bit confused, bec...
asked by 09.10.2018 / 04:30
2
answers

a href with single click until page reload

I have the following code <a href="{{ route('carrinho.deltocart', $item['id']) }}" id="deltocart"><i class="fas fa-minus-circle"></i></a> <a href="{{ route('carrinho.addtocart', $item['id']) }}" id="addtocart"><...
asked by 28.08.2018 / 19:09