1
vote
3answers
42 views

How to limit handling of event to once per X seconds with jQuery?

For an event such as keypress which may fire very rapidly, I want to limit the handling of the event (which I am doing using jQuery) to a maximum of once per X seconds. This jsfiddle shows keypress ...
4
votes
0answers
127 views

Why is this callback handler being called twice?

So I have the following JavaScript code. When the user clicks a button on the page, it reads the "name" and "stepId" from data attributes, and then opens a Twitter bootstrap modal dialog. When the ...
1
vote
2answers
49 views

Need help editing JavaScript - Trying to make a link “active” when another link is clicked

I need help help editing the following JavaScript. <script> $('.nav li a').on('click', function() { $(this).parent().parent().find('.active').removeClass('active'); ...
0
votes
0answers
11 views

WinJS - Redirecting mousewheel events

I've got a page with a scrolling list and some overlay elements. The problem is that the list isn't scrolling when the mousewheel is turned while hovering over the overlay. For technical reasons I ...
-2
votes
1answer
52 views

New to javascript but my function works wrong in firefox

I'm just getting into javascript and so far enjoying the logic behind it but i have an issue with Firefox. basicly im generating my javascript from within a php function and its a NON SECURE pin code ...
4
votes
3answers
61 views

get elements that did not load

How to find out all elements that did not load because the resource wasnt found? <body> <img src="notThere.png"> <script src="notInHere.png"></script> ...
0
votes
2answers
30 views

Creating a browser Exit popup

What I want to do is detecting the browser close event(on browser unload) and open up a new pop up where we have some options like (give a feedback, go to the page again , mail me a report etc). At ...
12
votes
5answers
8k views

(jquery/js) - get text from field on keyup, but with delay for further typing

Hey all. I have a form which is submitted remotely when the various elements change. On a search field in particular i'm using a keyup to detect when the text in the field changes. The problem with ...
1
vote
2answers
64 views

else if is not printing my console value

I am having a js code which displays a multi coffee value... if i am trying to display a single value coffee...its not going inside the else if.. i modified existing code but getting undefined ...
1
vote
0answers
22 views

Does IE10 support pan and tilt events - moving a ball through a maze using javascript and html5

I am starting a project where I have to modify an old maze game where you have to navigate a ball through a labyrinth using the arrow keys. The challenge is to control the ball using the pan and tilt ...
-1
votes
1answer
58 views

Javascript loading depending on PHP

I have a PHP 'if' that only loads a certain javascript if it is applicable: (this is from the <head> of my page) <?PHP if ($row['jstype'] == 'myanswer') { echo '<script ...
0
votes
3answers
36 views

Rest .next()? My click function adding '.active' twice?

If you take a look at this fiddle it will seem fine, but if you click next and move down 2 to 3 times, and then click "memory" (in top nav) it takes .active back to the first .item, then if you ...
0
votes
3answers
54 views

Combining chunks of Javascript

I'm far from an expert at Javascript, and self taught, and I think this is probably Javascript 101, but I must have missed that lesson. I've come up with the following code to make 7 rows in a table ...
0
votes
1answer
28 views

call addEventListener in loop with variable

I am new to JavaScript. I have a 6 elements that I want to equip with very similar event listeners. I have a working brute force solution that I want to improve, but (I think) I have trouble with Java ...
0
votes
2answers
545 views

How to make the cursor blinking visible in a text box while its value is manipulated via JS function called onfocus

In a form I have a textbox which should have a currency value. I have a requirement to show the currency in the format 234,345,456 and if the user want to edit, then I need to show only the digits and ...

1 2 3 4 5 465
15 30 50 per page