BUG @ event.metaKey and event.ctrlKey
I came across this bug while trying to add support for meta key in my jquery.hotkeys plugin (http://code.google.com/p/js-hotkeys) Here is what I found at jquery.js | version 1.2.6 | line 2150 // Add metaKey to non-Mac browsers (use ctrl for PC's and Meta for Macs) if ( !event.metaKey && event.ctrlKey ) event.metaKey = event.ctrlKey; This is causing a buggy behavior in the following scenario: A user wish to bind ctrl+x to function-A and command+x to function-B When ctrl+x were pressed, event.metaKey
Feature suggestion: relative wrapped set
Sometimes we need to build relaitons between two sets of elements. For example, a bunch of buttons will cause a bunch of menus to slide. In such case, we will have to register event listener for each of them. what if we can write the code like this: $({ "#button1": "#menu1", "#button2": "#menu2,#menu3" "#button3, #button4": "#menu4,#menu5" }.click(function(slave) { var button=this; var menu=slave; button.toggleClass("clicked"); menu.slideToggle("slow"); }); with the single statement executed, we
jquery post data response
I am getting a data response from post in the form of variable1 | variable2 I am having trouble splitting these and applying each value to where its needed $.post($(this).attr("href")),{}, function(data) { update = data.split('|'); $(update[0]).replaceWith(update[1]); }; return false; Thanks Tom
Ticket Feedback
Hey, I'd like some feedback on this ticket. http://dev.jquery.com/ticket/3355 Thanks -- Ariel Flesler http://flesler.blogspot.com
how to validate email field using jquery
<div dir="ltr">hi, any one tell how to validate email field using jquery bye arun </div>
Jquery .load() can't load style and js in html file on Safari and Chrome??
Hello all, I use $("#mydiv").load() to load a html file that has its own style and js, on IE and Firefox, it work good, but on Safari and Google Chrome, it can't load style and js in the html file, is it a bug? example: MainPage.htm <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Main Page</title> <script src="js/jquery.js" type="text/javascript"></script> <script type="text/javascript"> $(document).ready(function(){
How can we find out scrollbar position has reached at the bottom in js
How can we find out scrollbar position has reached at the bottom in js Thanks in adwance
should wrap use clone(true)?
Right now, wrap calls "clone()" instead of "clone(true)". This has the effect of causing any event handlers on the wrapping node to be lost; for example, $("#someElement").wrap($("<div>").click(function() { alert("hi"); })); Is this a bug or a feature? thanks! chris
ajaxSend not fired with jsonp
Hi all! I am trying to show a simple "loading..." image when I do some ajax calls. As is the example, I used: $("#ajax-loading").bind("ajaxSend", function(){ $(this).show(); }).bind("ajaxComplete", function(){ $(this).hide(); }); The problem is that the ajaxSend event is not fired with jsonp. I also tried to configure with ajaxSetup and the "before" argument but it's the same. jsonp is not really "ajax" since it does not use the XHR object, but in jQuery you can use it with the $.ajax method. I would
how to convert this code to jquery
<div dir="ltr">hi, any one tell how to convert this code to jquery <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "<a href="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd</a>"> <html xmlns="<a href="http://www.w3.org/1999/xhtml">http://www.w3.org/1999/xhtml</a>"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <script type='text/javascript' src='md5.js'></script> <script type="text/javascript"> var XMLHttpArray
offset body bug in webkit
If the BODY is offset from the HTML then offset should report that number - but it's zero in webkit. $('body').offset().left Test case here: http://www.partyark.co.uk/html/jqueryoffsetbody.html I couldn't find this in the bug db so I've created a ticket.
clone(true) doesn't copy event handlers on child elements
I expected clone(true) to be deep (ala MooTools); that is, clone all the child elements exactly, down to events and all. It appears this isn't the case: Example: <div id="outside"> <input id=inside"> </div> <div> $('inside').bind('focus', function() { alert('You focussed me!') }) //Result: if you focus on the input, you get an alert $('outside').clone(true).insertAfter($('outside')); //Result: the outside div is cloned and there now appears two, side by side (focus on the second input) //Expected
Meta tag Problem
Dear Folk, I've developed a website with ajax capabilities and bookmarkable supports history, I would like to give a specefic Meta tag to each page ... what is the solution ? there is two thing in my mind 1- upgrade the meta tag with jQuery when each pages loads ... for example $("meta[name=keywords]").attr("content","a,b,c,d"); but as you all know when the page loads meta tag is something else after that with ajax will be upgrade so I think this may cause some problem in search engins .... 2- load
how to convert ajax javascript to ajax jQuery
<div dir="ltr">hi, i send my full code for you reference tell how convert <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "<a href="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd</a>"> <html xmlns="<a href="http://www.w3.org/1999/xhtml">http://www.w3.org/1999/xhtml</a>"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <script src="md5.js" type="text/javascript"></script>// this script used in encoding format
how to convert this code to jquery
<div dir="ltr">hi, any one tell how convert below code in jquery var XMLHttpArray = [ function() {return new XMLHttpRequest();}, function() {return new ActiveXObject("Msxml2.XMLHTTP");}, function() {return new ActiveXObject("Msxml2.XMLHTTP");}, function() {return new ActiveXObject("Microsoft.XMLHTTP");} ]; function createXMLHTTPObject(){ var xmlhttp = false; for(var i=0; i<XMLHttpArray.length; i++){ try{ xmlhttp
tablesorter 2.0 incorrectly parsing columns as text instead of digits
Hi all, I have been testing the fantastic jquery.tablesorter with a view to using it to improve data display and digestion. The one issue I have run in to is when a column in a table starts with a 0 (zero). It seems to identify the column as text rather than digit and therefore uses the wrong parser on it. If there is a zero value in the column but its not the first in the list it works fine. I have also tested 00 and 0.0 to see if it ever handles these differently. It handles them all as text if
Very Strange IE Bug
Hi jQuery Dev, In internet explorer, using $('selector').html() will emit strange jquery attributes that sometimes can cause problem: $('#test').html() <-- <li jQuery32491238934="2"><span jQuery32491238934="null" class="name>... the problem is, when you need to insert those string back to html, the selector won't work properly. I created a demo to demonstrate this problem: http://code.riiv.net/demos/iebug.html in ie, if you click get length, it will return 1, whereas in other browser 4. any ideas?
replaceWith implementation
Hallo, in jQuery 1.2.6 is replaceWith(HTML) method is defined as after(HTML).remove() It's correct but if in inserted HTML is JS code witch refer some element ID from inserted HTML then JS may be evaluated on element with same ID in removed code and not on inserted. Example 1) original HTML ... <div id="testId"> <span id="subId"></span> <script> $(document).ready(function() { $('#subId').append('Some HTML'); } </script> </div> ... 2) in AJAX callback load new version of 'tesId' element (with other
Possible jQuery.fn.position improvement
Hi, I'm quite new to jQuery. I've encountered inconsistent behavior of position(), here is a simplest repro case: http://jquery.hildebrand.cz/position-simple.html http://jquery.hildebrand.cz/position-wrapped.html Wrapped version is incorrect, I would expect same result as in simple case, because position of the id1 div didn't change. There are 2 inconsistencies: a) different result than in simple case b) inconsistent behavior in X and Y I've been digging into sources and found these lines in JQuery
event delegation in core
<div dir="ltr">So I'm a big dummy, no news there, but I did finally understand the difference between event forwarding and event delegation. I'm now trying to road map based on the dev teams plans to include delegation in core or not in a near-future release so I can work delegation into a large collection of plugins I'm hoping to release before the sept 28th conference in Ba'sta'n. Any news on that front? Is it just just safer to include the delegation plugin as a dependency (trying hard to reduce
difference between jquery1.1.4 and 1.2.6 with regards to my app
Hello, I have created an asp.net (vs2005) web-app. When i use jquery1.1.4, then, on submitting the form, the background gets grayed-out and an 'results being generated' image (that i have put in the asp.net code) gets displayed. i replaced the 1.1.4 file with 1.2.6, and now the background doesnt get grayed-out (aspnet code remains same) at all. The image gets displayed but since the background isn't grayed-out/"disabled", the user-controls kind-of overwrite part of the image. My OS is XP/SP2. I am
Teaser - New History Manager
I'm going to ask you to use your imagination: Imagine an AJAX history manager that required absolutely no expertise to use. Imagine something that could be applied to forms and anchors to have them automatically be handled by AJAX and still maintain the browser history (back button, and bookmarking). Imagine something that works across all browsers supported by jQuery. Imagine something that still works when JavaScript is disabled or can itself be disabled with a single line of code. Imagine something
Make this in jQuery
Hi, i been using this mootools script to make navigation experiment. Is really nice but my site i use jQuery, and this script is in mootools, the problem is this script doesn't run in my site, mootools and jQuery are not compatible. Can someone help me?? Thanks This is the example i would like to do in jQuery http://woork.bravehost.com/mootoolsScroller/index.html
jQuery Branding
Hello, This is a little off topic but I have a few questions that I would like the share with the dev team: I was kind of surprise to find out that jQuery’s logo and now the website is linked to rock music! Rock music is known for the most part to be associated with devils, demons and sexual immoralities. If one should research the history of they will see the truth behind a lot of these rock groups and the purpose of their music. Can someone please explain the mindset behind linking jQuery to rock
Firefox 2 throws an error, but IE 6 works fine
My first jQuery project has me puzzled. I have a page http://twinflamingos.com/chris/chris.htm that throws and error when any of the menu headers is clicked. In IE 6 the drop-down works perfectly, but FF 2 doesn't work and puts an error in the log. Specifically it says: Error: [Exception... "Could not convert JavaScript argument" nsresult: "0x80570009 (NS_ERROR_XPC_BAD_CONVERT_JS)" location: "JS frame :: http://jqueryjs.googlecode.com/files/jquery-1.2.6.js :: anonymous :: line 871" data: no] Source
My script works in IE 6, but not FF 2
My page http://www.twinflamingos.com/chris/chris.htm works find in IE 6, but FF 2 returns an error pointing to jquery. Specifically: Error: [Exception... "Could not convert JavaScript argument" nsresult: "0x80570009 (NS_ERROR_XPC_BAD_CONVERT_JS)" location: "JS frame :: http://jqueryjs.googlecode.com/files/jquery-1.2.6.js :: anonymous :: line 871" data: no] Source File: http://jqueryjs.googlecode.com/files/jquery-1.2.6.js Line: 871 I used the uncompressed version to see what line the error is coming
IE8b2 crash scenario
IE8b2 will crash if you try to insert a text node after a float. This might not seem such a common thing to do, but remember that jquery parses html into nodes before appending - and if your html starts with a space then the first inserted node will be a text node and kabooom! I've put up test page here: http://partyark.org/html/ie8floattest.html This completely shafted my site (http://www.partyark.co.uk) where we use jquery to write a 'basket summary' div at the bottom of the page if you've got
jQuery.ajax bug on FF and Opera
Hi, I am getting bugs on using jQuery.ajax() on FF and Opera. FF is not responding at all, and Opera is giving an error, where IE and Safari are fine. Here's a link to example code showing the bug :- http://www.aarongray.org/jQuery/ajax-bug/jQuery-AJAX-test.html It should put up an 'alert()' box. And here's the code :- <html> <head> <script src="jquery-1.2.6.js"></script> </head> <body> <script> jQuery.ajax({ url: "http://www.aarongray.org/jQuery/ajax-bug/example.xml", type: "GET", dataType: "xml",
need revision of code (checkbox, cookie, array)
Hello, just started with jQuery and would like to ask some expert for help to revise my code. Script is working just fine but I am bit worried about my amateur code, think could be better.. Project problem: maintain state of checkboxes in a paginated datagrid (selecting diff products for comparison) Since using classic ASP needed help of jQuery. My solution: when select checbox beside each product write a cookie (PID) which holds array of product ID's (154+332+...) also cookie CID for products group
JQuery Bind Popping My Bubble
Hello, I looked in the documentation but couldn't find an answer, so figured I'd post. Consider the following scenario. function some_function() { ... } function attach_event(object, event, method) { if (object.addEventListener) object.addEventListener(event, method, false); else if (object.attachEvent) object.attachEvent('on' + event, method); } attach_event(document, 'click', some_function); I'm basically attaching a function to the document object that fires whenever a click event bubbles
Asynchronous loops
Hi, I often find myself iterating over a very large number of nodes using jQuery (selecting table rows, list items, etc.), like showing or hiding items based on a live filter, or recomputing a value inside every cell of a table. jQuery each() function is great for this but can sometimes be frustrating, like when the number of items to iterate on is very large. In this particular case, the loop can take a long time to execute (500-1000ms) and this is a problem because JavaScript is single threaded
<object/> clone() exception in IE6 & 7
There are a few tickets already opened related to this issue: http://dev.jquery.com/ticket/2845 http://dev.jquery.com/ticket/3142 http://dev.jquery.com/ticket/3289 If you try to clone an element that contains an <object/>, you'll get an exception: Object doesn't support this property or method Code example: http://dev.jquery.com/ticket/2845#comment:2 contains Along the same lines, the following crashes IE7: $("<object/>").clone(true); But the following doesn't (nor does it cause the "Object ..."
[autocomplete] - incorrectly refocussing?
Forgive me if this is the wrong spot for this but I figured I'd throw this out here before filing an issue in the bug tracker. I'm using jquery.autocomplete plugin version 1.0.2 * Copyright (c) 2007 Dylan Verheul, Dan G. Switzer, Anjesh Tuladhar, Jörn Zaefferer I have a form with an autocomplete enabled textfield, a textarea, and a button. When the button is clicked the textfield input value is used to retrieve something from the server and place it in the textarea leaving the focus on the textarea.
YUI Compressor doesn't munge jQuery code?
Can anyone give me a hint as to why using the YUI Compressor doesn't munge the variables in the jQuery code? It seems like it should -- I've tried compressing a few parts of the code, and they work fine. Thanks!
Visual glitches in IE around sortable lists
Hello, I'm not too sure whether I should post this here or on a IE development website... I have a <ul> list sortable connected with an <ol> list (sortable as well). The idea is to be able to drag unordered items in the first list and order them by dropping them in the second list. In FF my code is running without a hitch, but in IE I experience visual glitches (text dissapearing above the two lists, background color being painted over the container div along the path followed by the list item, ...)
jQuery function to close a window
jQuery is awesome! You can call one method to do something and it will work in all modern browsers. But recently i came it across and issue where window.close() javascript method doesn't work for all browsers, particularly IE and Firefox. Can you add a simple method to be able to close a window that will work in all browsers?
Redirects for jQuery
Hi, Today I realized that redirects in JavaScript suck horribly. Somehow it turns out that noone seems to encounter the same issue that I ran into today. Take this file, try it online (works) and then offline (does not work anymore - race condition triggered). <html> <head> <title>Testing JS redirection</title> <script type="text/javascript"> function redir() { document.location = '../test'; return false; } </script> </head> <body> <form action="http://jquery.com/" method="POST" onsubmit="return
Does Jquery Creates a Handle to Browser Windows
Lets says if i open a browser window using File -> New -> Window. I am wondering if Jquery creates a handle or reference to the browser window and stores it in Jquery Object. This kind of information will be very helpful to detect if browser has multiple windows opened. Please let me know if its possible to do with Jquery
problem in IE
<div dir="ltr">hi, i used jquery.js script in my program it is not working in ie but work properly in firefox. whats the problem? tell suggestion to me. bye </div>
$(document).ready() not really ready ?
Hello, I have a really strange problem using jQuery: I have a page that contains a form. This form contains a table with lots of radio button which is visible in CSS and a list wich is "display: none" in CSS. The idea is that the list will be set visible and sortable and used as a replacement for the radio button (wich are hidden using javascript and only there for gracefull degradation). I created the jQuery script locally, everything was normal. but when I tried with the page and the script on
Next Page