$.ajax{ cache : false ... } generate error on FF3
Wonder you all see this problem before? ~ sglai
creating new elements via jQuery(html) as <a> versus <a/>
In jQuery 1.2.6, I've noticed that this works in IE7: $(document.body).append($("<a/>") .attr("href", "http://www.google.com/") .html("Click Me!")); But that this does not: $(document.body).append($("<a>") .attr("href", "http://www.google.com/") .html("Click Me!")); The salient difference being creating the anchor element as "<a/>" versus "<a>". This also appears to be the case with "<span/>" versus "<span>". A bit of digging shows that the difference appears to be whether the elements end up getting
Analogy between .bind() and .data() ?
<div dir="ltr">So I did sit up and pay attention at the conference when I learned that events could be bound to pure javascript objects and not just the dom. I also am attempting to replace some code I have for simple data caching with $().data() . The question is, can I bind data to pure javascript objects and not just dom elements, and if not does it make sense to extend the same analogy the .bind() uses to allow this? <br clear="all"> -- Christopher Thatcher </div>
jQuery and guids
<div dir="ltr">One thing I didnt understand after the jquery conference was the specific algorithm behind the unique id that helps to distinguish runtime jquery instances when multiple are present. I know I could look at the code and I have before, but I still wouldnt probably have a numerical measure of its strength as a guid. If it is strong enough, practically, why doesnt the core simply expose a .guid() method and use this internally while also providing it externally (it would save my plugins
JQuery "unbind" documentation
Hi. Just to let you know that the unbind documentation is wrong: http://docs.jquery.com/Events/unbind#typedata It receives a "fn" argument, instead of a "data" argument.
IE7 .png transparency bug on fadeIn and fadeOut
Hey all, I've run across a bug and am wondering if others have found a workaround or solution. I have an absolutely positioned div with a background image that has .png alpha transparency. Debugging has isolated the issue to jQuery's fadein effect. It also errs with animate({opacity}). It works fine before calling the animation. A screenshot demonstrating it in Safari (left) and IE (right) post- animation. http://i36.tinypic.com/28krlh4.jpg Has anyone run across this bug before? Are there any fixes
Code does not work Firefox 3.
Hi, Following simple code does not work on my Firefox 3 and IE (Firefox 2 and Safari are fine). $.ajax({ type:"GET", url:"file.xml", async:false, success:function(xml){ $("tag_in_file", xml).each(function(i){ // do something; }); }, dataType:"xml", }); I can see the success handler is call but when it comes to $ ("tag_in_file", xml), it does not find it !? Thanks, sglai
jQuery draggable problem in IE7
jQuery draggable is not calculating the scrollbar position when dragging items. Its easy to reproduce the problem by inserting a lot (a hundred, for example) of Test paragraphs before the <div class="block"></ div> in the example code located in: http://docs.jquery.com/UI/Draggables and trying to drag the box. In Firefox works fine, but in IE7 the box will disappear and fly to the top of the page. Is this problem already known? Is there any solution to it?
jQuery breaks fast history navigation
Hi, Both Opera and Firefox allow "fast history navigation", or "bfcache". In that mode, they remember the state of the previous page, including event handlers. Because of bugs in IE and FF<3, jQuery currently removes event handlers on "unload" (the last few lines of events.js). That means that when going backwards to a jQuery site, all interactivity is lost, in theory at least and for quite a few Opera users in practice. Both browsers detect when this would be a problem and will completely reload
$.ajaxSetup({mydata:this}) does not work in version 1.2.5 onward
Hi, Happen to find this problem. Does release test case cover this? Regards, sglai
main site seems to be down
Tested Fri Sep 26 13:20:21 CEST 2008 -- Diego
add/remove class: regexp support
version 1.2.6: // internal only, use hasClass("class") has: function( elem, className ) { return jQuery.inArray( className, (elem.className || elem).toString().split(/\s+/) ) > -1; } very compatible patch: // internal only, use hasClass("class") has: function( elem, className ) { var classes= elem.className || elem; if( classes instanceof RegExp ) return ! className.replace( classes, '' ); return jQuery.inArray( className, classes.toString().split(/\s+/) ) > -1; } true way ;-): // internal only,
Hi guys! i want to change div ...
<div dir="ltr">Hi, I want to change div size on page load .. </div>
Ticket Feedback (#3401)
Hi Dan Switzer added a feature request asking for a special property added to event objects when the event is triggered by $.trigger(). He provided a test case but I'm not yet convinced. Could you give your opinion on this ? Additional test cases from many users could help. I think, in a general way, that if you bind a handler to a certain event, then it should work the same for real and fake events. Else, maybe you shouldn't be binding or relying on that event, keeping that as a function/method
.is()-method should support another jquery object as first parameter
I needed to check if one element was the same as another. Currently, $ (aSel).is(aJqueryObjectMadeFromASelector) erros out, so you got to do a $(aSel).attr('id') == aJqueryObjectMadeFromASelector.attr('id') for it to work. It would be much better if the jQuery.fn.is-method could support another jquery object. Currently I made my own rudimentary implementation, used like this: target.isSameAs(toolTip) jQuery.fn.extend({ isSameAs:function(selectorOrJqueryObject) { selectorOrJqueryObject = $(selectorOrJqueryObject);
backgroundPositionY
Am I referencing to it the wrong way? $(".right > li > a").hover( function () { $(this).css({ backgroundPositionY:"0" }); }, function () { $(this).css({ backgroundPositionY:"-8px" }); } ); I have some li containing each a a(link) tag (block, whose background images are top shifted of 8 px). With the above code, I'd like to shift down the bg image on mouseover and go back on mouseout. I verified that the traversing is right, simply using another property (opacity) and it works. So it must me the name
Custom Event Bubbling
Dan Webb has given us a patch for custom event bubbling: http://dev.jquery.com/attachment/ticket/3379/bubble.patch Any thoughts? --John
Wrong Window
Hello, I have a problem which only happens in IE and just wanted to ask for a quick sense check before I submit a bug. I am creating an iframe, for which I get the window object and attach a handler to the blur event. When the event fires the 'this' in the function refers to the main window, not the iframe window. Here is the code <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> <head> <title>Window bug</title> <script type="text/javascript" src="http://code.jquery.com/jquery- latest.min.js"></script>
ajax success callback
Can the ajax success callback also receive the xmlhttprequest object, just like the error callback? The situation i am in is that i need to do something different when i receive a 302 (which is considered success).
Has the error within the internal clean been addressed yet?
Line 942 of jquery-1.2.6.js reads: // !context.createElement fails in IE with an error but returns typeof 'object' Has this error been addressed in any way yet? My page is throwing javascript errors twice on each widget load.. and I didn't want to try and address this if it has already been done. Thank you Robert Zumwalt
28th event venue?
<div dir="ltr">I'm trying to book a room (or sleep under a couch) relatively close to the event but I can't find the location (still listed as TBD on the pages I can find). Can you at least post a general area of the Boston metro? Thanks and looking forward.<br clear="all"> -- Christopher Thatcher </div>
Scirpt Error In Wordpress
I am consistently getting this error in wordpress when I try to write a new post. It freezes up my screen and I do not know how to fix it, please help: A script on this page may be busy, or it may have stopped responding. You can stop the script now, or you can continue to see if the script will complete. Script: http://www.rhymehouse.com/wp-includes/js/jquery/jquery.js?ver=1.2.6:11
QUnit updates: Tests for QUnit; module setup/teardown
Hi, I've landed a few updates to QUnit: To start with, there is now a testsuite to test QUnit: http://dev.jquery.com/view/trunk/qunit-test (requires a checkout, due to svn:externals) Tests so far cover only the newly module-based setup/teardown callbacks. These allow you to define code that runs before and after each test in a module. More: http://docs.jquery.com/QUnit/module Other changes affect the global variables exposed by QUnit: Instead of making everything global, only the public API is exposed,
additional ui.datepicker localizations
hey folks, how far do we want to go down this rabbit hole? For example, there is no localization for GB, which is the same as the default except the date format is dd/mm/yy instead of mm/dd/yy. There are a *ton* of these exceptions, and I've been going through and adding a handful of the most common ones. Is this something that is of interest to others? If so, I'll open an issue and attach them (when the ui.jquery.com site comes back up so I can see where to do that). Thanks! Adam
Problem with jQuery.fn.position() and Invisible elements
Ran into a little problem with jQuery.fn.position() when the element that is applied is not visible. If i do: var pos = $("#divHover").position(); alert(pos.left + " " + pos.top); On an element that is not visible, jQuery blows up with an error like this: [Exception... "Could not convert JavaScript argument arg 0 [nsIDOMViewCSS.getComputedStyle]" nsresult: "0x80570009 (NS_ERROR_XPC_BAD_CONVERT_JS)" location: "JS frame :: http://localhost/jqueryWeb/scripts/jQuery.js :: anonymous :: line 878" data:
noob needs help..
found this somewhere and try to test and learn from this <script src="jquery.js" type="text/javascript"></script> <script src="jquery.validate.js" type="text/javascript"></script> <script type="text/javascript> $().ready(function() { // validate signup form on keyup and submit $("#form-name").validate({ rules: { sender_name: "required", sender_email: { required: true, email: true }, recipients: { required: true, email: true } }, messages: { sender_name: "<span style='color:red;font-weight:bold'>*</span>",
noob needs help..
found this somewhere and try to test and learn from this <script src="jquery.js" type="text/javascript"></script> <script src="jquery.validate.js" type="text/javascript"></script> <script type="text/javascript> $().ready(function() { // validate signup form on keyup and submit $("#form-name").validate({ rules: { sender_name: "required", sender_email: { required: true, email: true }, recipients: { required: true, email: true } }, messages: { sender_name: "<span style='color:red;font-weight:bold'>*</span>",
built in function to do custom checks on int or floats
not sure if this is built in or not, but all i need to do is check if an input text value is a Int, Float and contain less than x amount of characters. I read the API and not sure if it's already built in or i'll have to add it. If i have to add it myself where is a good tutorial?
Chrome user agent
<div dir="ltr">Chrome on Vista is reporting:<div> </div><div>Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US) AppleWebKit/525.13 (KHTML, like Gecko) Chrome/<a href="http://0.2.149.27">0.2.149.27</a> Safari/525.13 </div> <div> </div><div>Will this be added to jQuery.browser?</div><div> </div><div>--Erik</div><div> </div></div>
Accordion not working with jquery1.2.6 packed version
Hi All, Im a newbie to jQuery and very much excited with the way it works. Currently I need to add Accordion to my project. I tried the example given in the documentation for Accordion. It works well with the unpacked Jquery from the server. When i add the packed version of jQuery from my local drive accordion is not working. Can anyone help me out with the problem i face. Thanks in advance!!! Regards ~nizzi
javascript evaluation possible through DOM 0 event attributes
Hi devs, would like to leave a note on this, seem interesting and maybe can be used as an alternative to globalEval. It turns out that we have another way to evaluate javascript strings easily, namely by using setAttribute() to assign a string value to some specific attribute like the DOM 0 (or in-line) event. So, at first I tried using the standard body "onload" attribute, but I in IE that didn't work as in FF. Then I did some test with an image and that worked both in FF and in IE (believe it works
Slow & Unresponsive: jQuery API and jQuery UI API, Demos
I am experiencing slowness and unresponsive whenever I need to do referencing on the jQuery API (documentation) and jQuery UI's API and demos. This been going on for over a week and it is very random throughout the day. Every time I experience slowness and unresponsive, I check a reliable site like Google or I ping Google, and the results are good and fast. I don't think if it's on my side or what? I'm working at the University and at Home, Orlando, Florida. The jQuery and jQuery UI are the only
javascript:void(0) not working
Hi, I am a newbie in using jquery.Please excuse me if similar query has been posted earlier. I am building pagination using jquery. links are displayed like First | Previous | 1 - 15 | Next | Last If i click on Next link, it will build the whole listing on run time some relevant parts of my code is $(function() { $(’#nextlink’).bind(’click’,loadmaillist) $(’#prevlink’).bind(’click’,loadmaillist) $(’#lastlink’).bind(’click’,loadmaillist) $(’#firstlink’).bind(’click’,loadmaillist) });//ft function
Mouse over effect not working
Hi I have integrated jquery base ajax call into a html page, after the request completes, the result is into the appended to the html page using the append() function. But the same css features in the current html page is coming with the newly appended html part. Could you lemme know the issue behind this and gimme some code snippets to sort it out thanks in advance Joban john <? while($life) { $knowledge++ ; } ?> 1) He who lives by the sword will die by the sword.. http://code4u.co.nr/ http://www.linkedin.com/in/jobanjohn
javascript:void(0) not working
Hi, I am a newbie in using jquery.Please excuse me if similar query has been posted earlier. I building pagination using jquery. links are like displayed like First | Previous | 1 - 15 | Next | Last If i click on Next link, it will build the whole listing like some relevant parts of my code is $(function() { $('#nextlink').bind('click',loadmaillist) $('#prevlink').bind('click',loadmaillist) $('#lastlink').bind('click',loadmaillist) $('#firstlink').bind('click',loadmaillist)
Expandable Accordian-type Left Navbar: Can I create Web links to the parent titles?
How does one create web links to the parent in addition to the children links? The following code only allows web links to the children. Thank you. <head> <title>DL Demo</title> <script src="http://jquery.com/src/jquery.js"></script> <script> $(document).ready(function(){ $("dd:not(:first)").hide(); $("dt a").click(function(){ $("dd:visible").slideUp("slow"); $(this).parent().next().slideDown("slow"); return false; }); });
error with space-separated attribute selector ( ~= )
Hi folks, Someone on Twitter just alerted me to an error in one of the attribute selectors: ~= . According to the W3C [1]: E[foo~="bar"] an E element whose "foo" attribute value is a list of space-separated values, one of which is exactly equal to "bar" So given $('[class~=bar]') , the following should match: class="foo bar" , class="bar" , class= "baz foo bar" but these should not match: class="foobar" class="barfoo" class="foo barbaz" Currently, jQuery is treating ~= the same as *= , which is
Simple $(document).ready question
I am working from the VanDyk / Westgate Pro Drupal Development book with (working) code below. I have modified it slightly (also below). My code breaks--that is, the first $('a.targetme') works, but not the $ ("a.unit"). I SUSPECT the problem arises because there is NO $ ("a.unit") when the document loads. You first must click the $ ('a.targetme'). Any thoughts? Code from Westgate book ===================== // $Id$ // Global killswitch if (Drupal.jsEnabled) { $(document).ready(function(){ $('a.plus1-link').click(function(){
Permission denied to call method Location.toString using getJson
Hi, I am a newbie in using jquery.Please excuse me if similar query has been posted earlier. I am using $.getJSON() on the click of a link. when i pass the url it gives error 'Permission denied to call method Location.toString'. The url passed is correct and is within the same domain. code snippet is $(function() { $('#alink').click(function(){ var urljson = ' http://home/mailist?output=json'; alert(urljson); $.getJSON(urljson,function(datajson){ alert('datajson '+datajson); });//getJson });
jQuery Nightlies ..1 year counting, broken.
Hi, I've been trying to get the nightlies for some time, but like John says the script that builds them seems to keep breaking ..now my question is: Shouldn't this be treated just like any other jQuery/UI bug and finally addressed ? Thanks, Robert
Next Page