Tagged Questions
0
votes
1answer
10 views
On an EventEmitter, how can I know all the events I can listen to?
Supposing I have an object that inherited from EventEmitter, like a stream or any other, is there a good way to know all the events I can listen to, and all the attached event listeners ?
I think the ...
2
votes
0answers
14 views
Adding some events to JDashBoard plugin
I am using JDashBoard.It is an excellent Dashboard solution. But I need to add some more Functionality.
I need the events like DragStart, DragStop..
So that I can avoid dragging some of my Widgets in ...
0
votes
0answers
15 views
can I cache click event on any website that does not belong to me
I am trying to append a script to any website ,using for example chrome extensions.When the extension is on, the javascript would listen to the mouseenter event but not click event (because it would ...
0
votes
4answers
35 views
mouseover fires multiple times over one span element
Here's a simple jsFiddle:
http://jsfiddle.net/cEDj6/
I have one span element that I bound mouseover to. When I move the mouse horizontally across different lines of text, mouseover happens only ...
0
votes
1answer
29 views
How to load remote URL inside sidebar
I'm using the next code to inject a sidebar. https://github.com/curtislacy/inject-sidebar
function handleRequest(
//The object data with the request params
request,
//These ...
1
vote
4answers
40 views
What happens when you blur a DOM Element
I am having a hard time finding any documention on what is "suppose" to happen whenever a DOM element is blured.
My naive assumption was that the browser whould traverse up the DOM to find the next ...
1
vote
0answers
8 views
Mobile WebKit select input - how can I delay the onChange event until Done is tapped?
In mobile WebKit iOS Safari when you have an onChange event, it fires as soon as you select an option, which is expected I guess.
For purposes of avoiding an unnecessary database lookup I want to ...
0
votes
3answers
68 views
Javascript remove onclick
Im setting an aside in my html-code. I have create a javascript that allows me to change the width and when i click aside a second time decrease the width. But when i click aside two times then will ...
2
votes
4answers
68 views
Capitalize first character of user input in real time with JQuery
I am trying to auto-capitalize the first character of a textarea/input that the user inputs. The first attempt looked like this:
$(document).ready(function() {
$('input').on('keydown', function() {
...
0
votes
1answer
28 views
load iframe and reset document location at the same time
load iFrame and reset document location at the same time
Hi, I'm making a video album for a DVD present to family members. The video's will be displayed in an iFrame similar to Youtubes, with ...
0
votes
0answers
17 views
Remove event listener from mouse wheel listeners
I'm using addEventListener to add events to the mouse wheel detection. (I've tried it also with jQuery but it doesn't work in all browsers)
if (document.addEventListener) {
...
0
votes
2answers
36 views
a script translatable to JavaScript with callback-hell automatic avoider :-)
I looking for "translator" for JavaScript like already is CoffeScript, which will be work for example with forEach (inspired by Groovy)
myArray.forEach() -> val, idx {
// do something with ...
0
votes
1answer
18 views
addEventListener and getEventListeners
var handler = function(){}
var evt = "test";
el.addEventListener(evt, handler, false);
after addEventListener, we've attached an event to the element.
but how do I get the event infomation ...
0
votes
1answer
44 views
Enable dot and Tab in textboxes
I have text boxes which only allow to enter numeric values.I handled it using a JavaScript .But it doesn't allow me to enter dot and tab movement . I need those two as well . How to change this code ...
0
votes
1answer
23 views
Working with an image error event in a Backbone view
Within an Underscore template used by a Backbone view I have an image. I'm trying to attach to the error event and change the image source if the original image is not found.
Based on this similar ...
0
votes
3answers
40 views
Add a class name to element immediately this element is loaded
I have an element which has to be hidden when JavaScript is enabled. The current code seems like this:
<body>
...
<div id="js-hidden"></div>
...
<script ...
0
votes
1answer
19 views
Javascript library for event handling has strange 'undefined' error
I have been working on a javascript library for event handling. Here is some of the library's code:
01| (function(){
02| var int,
03| Jist = function(s){
04| return new ...
0
votes
3answers
24 views
Javascript event library 'unidentified'
I have been working on a javascript library for event handling. Here is some of the code:
01| (function(){
02| var int,
03| Jist = function(s){
04| return new Jist.fn.init(s);
...
3
votes
2answers
50 views
jQuery Event Callback Speed: Anonymous vs. Named Functions
This is kind of a random question, but I was wondering why a named callback was performing worse, for a click event, relative to an anonymous function.
Here is the link to the JSPerf tests I ran in ...
1
vote
2answers
51 views
How to make a change event only run one time the event is called for a class
I'm designing a multi dynamic select menus, ie, I have a menu for brands, after the user select the brand, using javascript and AJAX, I will search for the models available from that brand and add ...
0
votes
1answer
13 views
Update backbone model on click event and wait for response before changing location
I would like to update a backbone model when a user clicks a link. The code I have at the moment is:
$('a').on('click', function(){
// prevent default
event.preventDefault();
var id = ...
0
votes
0answers
12 views
plotzoom unbinds datahighlight in jqplot
I have a jqplot chart that is coupled with other elements on the side by hovering over it.
Now I want to add plotzooming to it, but after you used the zoom function, the datahover doesn't work ...
1
vote
2answers
28 views
Deny jQuery events during an animation
on hover, i want to animate an div. During the animation i want to disable the hover possibility to avoid the animation call, several times. I removed the mouseenter event with "unbind". Once the ...
0
votes
0answers
11 views
how to solve the swapped out error in chrome? [closed]
When i opened a blocked popup it shows swappedout error and it returns frame protocol and swappedout protocol did not match? what is swappedout protocol and how to solve this?
-1
votes
1answer
19 views
How can i get the destination url of a link on the web page in the javascript onbeforeunload event?
While there have been similar questions asked I am looking into a specific issue.
Is it possible to capture what link on the web page the user clicked on?
Not talking about if they manually entered ...
0
votes
1answer
18 views
I want after googlemap initialize do some events, how can I do it?
my personal define layer load slowly, I want to after the all google map including my layer loading do some java-script staff, how to do it? how to find the initialize finished events?
0
votes
1answer
22 views
Reference hyperlink from button with java script
I have a web page with dynamically generated hyperlinks in a grid view. For every hyperlink should be a corresponding button, which does nothing else than calling the link. How can I reference the ...
0
votes
1answer
35 views
What's the best way to design events to change a menu?
This is for a menu system I am creating in JavaScript. I need some advice here as to the best way to design this. I'm still new enough to js that I don't trust my own instincts.
The office menu ...
0
votes
0answers
50 views
Javascript triggers click event on submit button only once?
I have a form whose submission updates the content of a div tag using ajax, now I am using javascript to click the submit button automatically after a series of events triggered by the user. I noticed ...
0
votes
1answer
35 views
Why is addEventListener only executing my function but not creating a mouseover/mouseon event for it?
I have an assignment and I can't seem to figure out this one part:
I have written a javascript function to preload/precache two images for EACH image tag, from the "img" folder based on the ID of ...
0
votes
3answers
48 views
Onblur triggering everywhere
Update
It appears that the input is locked until I input a well formatted email address and then and only then is the element able to be unlock/unfocus. That is just weird, because if I can't focus ...
1
vote
1answer
25 views
jquery Sequential navigation
I need to get the index number of clicked list item, which may nested in another UL.
The code works fine except in the case of nested ULs. Since you are clicking on a parent and a child LI at the ...
0
votes
2answers
46 views
Javascript: Select window onload function
The legacy html I have inherited has numerous js calls of the type
Event.observe(window, 'load', function() {
// Various snippets of code
});
I would like to be able to fire all of the ...
0
votes
3answers
41 views
JavaScript Restrict User From Clicking Button Multiple Times
I am trying to restrict the user from clicking on a button multiple times. They can click on the button once when the page loads. If the page is reloaded the same should apply the user can click on ...
1
vote
4answers
29 views
Check for function called
Just wondering if there is anyway to fire some code when a function is called, without adding the code to the function, for example:
function doSomething(){
//Do something
}
//Code to call when ...
2
votes
1answer
34 views
How to removeEventListener that was added using closure?
This is basically a followup question to this: Can't pass event to addEventListener: closure issue.
I have read almost every related question and can't find the answer to this.
The function ...
1
vote
1answer
80 views
+50
Strange / Inconsistent scrollTop behaviour
I stumbled into this one whilst trying to scroll an element without invoking the normal event handlers
Using both Firefox and IE10 I'm seeing some really strange behaviour in how the scrollTop method ...
0
votes
2answers
41 views
JS error in firefox working fine in IE
I have below method which is working fine in IE but I am getting the following error:
TypeError: hdnButton .click is not a function
when I use it in Firefox.
function PopupTest() {
var ...
0
votes
0answers
38 views
On run javascript if session is false
I need to redirect a to a page if a session does not exists before loading a java function. Problem is it is preloading as soon as the page loads. any ideas how to get around this please.
Her is what ...
1
vote
1answer
49 views
Find out which event types are available
In meteor the following event handler should be triggered when a css3 transition ends:
Template.flipper.events({
"transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd": function ...
0
votes
0answers
33 views
Draggable Icon Not Showing on top of the Google Map and not Duplicating
How can I implement draggable icons markers using this Google Maps Example
So far I have the code below:
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" ...
2
votes
2answers
36 views
Does javascript event queue have priority?
These days,I have read some documents about setTimeout,setInterval. I have learned that the javascript is a single thread which will only execute one piece of code per time. At the same time,if there ...
0
votes
1answer
30 views
Expand/retract blinking bug in javascript
I have facing this bug, I have a script in javascript which handle actions on mousedonw event. one do expanding and one do retracting the element using the javascript. It's done by timeloop and ...
0
votes
0answers
33 views
Events while HTML document is being loaded?
I have a html-webhandler which is writing back content asynchronously. While this is happening I want to scroll the page to bottom all the time until the page has been completely loaded.
My first ...
0
votes
0answers
22 views
inject a key event using JavaScript
Can anyone help with a JavaScript key event.
I am looking to emulate a "Tab" operation in part of a document (table) where the enter key acts the same as a tab button press.
I have been looking in ...
0
votes
1answer
25 views
How to track outbound links in GA according to this method, incl. Label & Non-Interaction?
I came across this helpful article from Google Support regarding tracking Outbound links, but it leaves a bit to be desired in that it does not include instructions regarding event labels or the ...
0
votes
1answer
19 views
Setting separate function parameters in javascript with addEventListener to have unique ids
I have a for loop that generates elements into a div, and I want to have each element calling the same function but with an unique id.
for(var i = 0; i < 10; i++)
{
var p = ...
0
votes
0answers
37 views
Javascript click event bug (probably)
Sorry, but it's probably gonna be noobie question)
Got an annoying bug and have no idea what the problem is:
i hold global variable: var cur_id=0;
When i click on textarea i want to save textarea's ...
0
votes
0answers
40 views
Dispatching events, ie9, svg and css pointer events
I have svg layer on top of div, and I would like to dispatch events from svg to div layer that has contenteditable set to true resulting thus in div having a focus.
Here is html:
<!DOCTYPE ...
2
votes
2answers
48 views
Javascript Event Priority
With the different ways of adding events in javascript, do any of them take priority like css classes do? For example will an inline onclick even always fire before one added with addEventListener?
...