Questions tagged by "jquery"


0
 bounty
1
answers
Get progress of an JQuery AJAX request
6 years ago • lampego1@qrid
I use this code: var formData = new FormData(); for (var i = 0; i < files.length; i++) { var file = files[i]; formData.append('files[]', file, file.name); } $.ajax({ url: '/url', // dataType: 'json', type: 'POST', // Form data data: formData, // Tell jQuery not to process data or worry about content-type // You *must* include these options! en
1
 bounty
1
answers
Javascript to show popup window when user moves mouse up fast to the top trying to close / leave this web page
10 years ago • alex
I've seen this clever marketing tactic on many websites - when I am about to leave their website and move my mouse up fast to the top of the screen (to close their tab in Chrome, etc), the site reacts real fast, showing me some large modal window with "subscribe" email capturing form, or with "special offer" . The timing is really good, and I usually stop for a second to decide on that modal window. I do it almost unconsciously, and so I woul
0
 bounty
1
answers
How can I find a specific ancestor DOM element using jQuery?
10 years ago • lampego1@qrid
I need to find a specific ancestor element (parent, grandparent, etc) which MAY be located FEW LEVELS above the given (child / descendant) element in the HTML DOM tree. The specific element I am looking for is marked with a special CLASS, i.e. . > ... class = "parent" ... I'd like to use jQuery to locate that ancestor element starting from one of its descendant elements. Thanks!
1 from 3