Questions tagged as 'jquery'

2
answers

Script js does not interrupt submit form

Personally I'm having a problem with an algorithm in jquery, that of uploading files with ajax without refreshing the page. I do not know why when I put return false; at the beginning of the algorithm the submit is canceled but consequ...
asked by 03.01.2017 / 20:36
2
answers

Long click with JavaScript

On Android there is the OnLongClickListener method in which you can hold your finger on a View and an action is triggered (if the developer sets an action) if that click stays for a little over 1 second. p> I have this small tabl...
asked by 19.06.2017 / 02:24
2
answers

how to change h2 to h1 via jquery

I need to change h2 to h1 dynamically I thought I would use jquery as follows but it does not work: $("h2").removeAttr("h2").attr('h1'); $("h2").attr('h1'); using classes as selector; $(".wd-product-list .wd-widget .wd-title").Attr("h1"...
asked by 21.07.2017 / 15:47
2
answers

Function () X Function.call () [duplicate]

When parsing Javascript / jQuery plugins, I usually see functions being invoked with .call() . Home I understand that by calling functions in this way, the first parameter passed is this (in this case, the function call provider)....
asked by 25.08.2017 / 19:43
2
answers

Make LI appear only on Mobile

I have an LI and would like it to be shown only in mobile mode: <ul style="display: block;"> <li><a href="/">Início</a></li> <li class="list-cat"></li> <li><a href="teste">Preços</a&g...
asked by 19.06.2017 / 15:57
1
answer

jQuery doubt append appendTo inject HTML

Hello, I have a question. I have a variable containing an html structure and I need to inject a basic div (< div < / div >) around the contents of this variable, as a parent, using jQuery only. I think I should use append and ap...
asked by 18.05.2017 / 14:34
1
answer

How to detect the collision between two squares / rectangles

Anyone who provides a response that explains all the nuances required to do so in javascript will earn the points.     
asked by 15.03.2017 / 14:53
2
answers

Find 2 date attributes in a single element

How can I find a particular attribute that contains another specific attribute attribute? for example: <a class="fc-draggable" data-belongs="3" data-target="2"></a> I can select all elements that contain a given attribute using:...
asked by 23.09.2016 / 20:47
1
answer

Problems with events in dynamically created elements

My intention is: A listing where you can add <div> and delete the divs added with a "button" inserted in each div . The page already comes with a fixed% inserted divs that are the same as those that will be added....
asked by 16.07.2014 / 03:58
3
answers

Is there a better way to insert an option in select with jquery?

I wanted to know if there is a better way to insert option into select with jquery. Example: <select name="municipio_evento" id="municipio_evento"> <option value=""></option> <option value="1">ACEGUA<...
asked by 07.10.2014 / 19:50