So I have a couple of divs overlaid on eachother with differing z-index values.
The default behaviour for browsers seems to be the event bound to the top-most z-index div gets fired. Ie I have multiple onclicks one for each div but only the top one is fired when the area is clicked.
Is there a way to fire the events attached to all di...
Hi all,
I am automating a an application written in C#. i dont have its code. in application there is a grid view table containing list of templates. i want to select a particular template by its name and not its row index.
for example: consider the grid view table consisting list of months. Now i want to select "May" month in the li...
This perhaps is a more general jQuery (or even Javascript) question: Basically I am using jquery-in-place-editor plugin for a membership portal that I am building, where this page lists all members from a database table. So you can imagine this page has a number of profiles with typical fields like name, profile, profile image, and email...
I'm new to Dojo (quite experienced in jQuery) for a project, and am working on adding/removing some classes that will change styles for main navigation links and drop-downs.
Here is the code I've written:
dojo.addOnLoad(function() {
dojo.query('#primary-nav > ul > li > div').forEach(function(container) {
var hoverToggles = doj...
Hello,
how could I fire a event if the a css class was added or changed qith jQuery?
Does changing of css class fire the jQuery change() event?
...
hi,
i had written one JS in asp.net. I had called that from body onload, but the JS doesn't get called where i have put my debugger. What could be possible reasons for this? I'm developing website in dotnetnuke.
The JS i have written is syntactically and logically correct.
Thanks
<script type="text/javascript">
var displayTime, speed...
Hi,
I just started adding JS-validation to a signup form and I want the username input field in a Twitter-style (using jQuery). That means that the input is limited to certain characters and other characters do not even appear.
So far, I've got this:
jQuery(document).ready(function() {
jQuery('input#user_login').keyup(function() {
...
A lot of time I see jQuery code that looks like this:
$('a').live( 'click', function(event){
..
});
What does the event parameter do? Does it correspond to the element 'a' or the event 'live'?
...
hi,
how to replace a hypen (-) with a slash (\) in javascript?
for example, i need to replace
C-MyDocuments-VisualStudio2008-MyProjects
with
C\MyDocuments\VisualStudio2008\MyProjects
i tried replace function such as variable.replace("-","\") but it showed me error of unterminated string constant
i am working in VS 2008
...
hi,
i am passing a path as an argument in a javascript.
for example i am passing a path as c:\my documents\user\aa.jpg when registering javascript in client side.
but when calling this in a function say, function js(d) then the slash goes missing..hence the value of 'd' becomes c:mydocumentsuseraa.jpg
what to do?
thanks
...
Hi All,
What exactly I am trying to do is add on more shortcuts to Google Chrome browser. As of now I am using window.addEventListener('keyup', keyCheck, false);
I post a message then to the background page to carry out the relevant task.
I wonder if there is a way to achieve this when the current tab doesnt show any proper page (like...
I do have a credit card number form. The number is divided into four parts just as on a real credit card.
I want to add a JavaScript taste to the form where when a user types four letters in a field, the focus automatically goes to the next tag. But not in the last tag. By doing this, a user doesn't have to type "tab" key to move a focu...
I have an ajax callback which injects html markup into a footer div.
What I can't figure out is how to create a way to monitor the div for when it's contents change. Placing the layout logic I'm trying to create in the callback isn't an option as each method (callback and my layout div handler) shouldn't know about the other.
Ideally I...
When a user clicks on a select control to select an option, do both the onclick and onselect events fire? If so, in what order? Is it browser-dependent?
Thanks!
...
I was wondering if someone could help me clean up this code if possible; including merging the two functions into one. I'm new to javascript so I could really use some help.
I was able to get this script working quite well, I just want to know if it can be refined and/or if there are any problems with it that I overlooked.
The script ...
I have been experimenting with dispatching events in Firefox and noticed that dispatching the mouseover event on a link does not cause its style to change to that defined in the :hover CSS class. Dispatching the 'click' event does change the link style to :active. Any reason for this behavior or I am doing something wrong in my code?
va...
We are writing an ExtJS application that relies in large measure on trapping a users keystrokes. However I believe I have discovered a "timing issue" in that, when the keys are pressed too rapidly, unexpected behavior manifests, specifically in our case, duplicate entries get added to an array being buffered in memory.
I have an idea f...
Is there any way to apply this to a div?
...
consider this code sample :
<a href="some url" onclick="confirm('ok to proceed ?')">bla</a>`
<script type="text/javascript">
$(document).ready(function() {
$("a").live("click", function (event) {
// In that function, I want to get
// the "confirm" return value ...
I have a situation where I have a navigation menu that's a series of <ul> lists, the first <li> of which is a tab. I want to make the entire <li> clickable instead of the <a> tag inside the tab. So for example:
<ul id="home">
<li id="navtab">
<a id="home-link" onclick="doHome();">HOME</a>
</li>
</ul>
And the anchors ...