jQuery 1.2.3 Released
Hey Everyone - We just released jQuery 1.2.3, more information can be found in the announcement blog post: http://jquery.com/blog/2008/02/08/jquery-123-air-namespacing-and-ui-alpha/ --John
How to prevent JS processing via Ajax?
Hello, Is there a way to prevent the processing of embedded Javascripts within an html page that's called using the Ajax load methods? // example: // I want to prevent the scripts in some_html_with_javascript.html from // being executed when the page content is loaded $('#viewer').load("/some_html_with_javascript.html");
ajaxStart / ajaxStop and Global Triggers..
If you use ajaxStart or any other global trigger. The event.trigger() code calls itself on all elements in the page by calling $('*') and adding document and window to this collection. This leads to some problems for me. A recent project has about 3300 elements if you do a $('*').size(). I have the obvious: $('#loader').ajaxStart(function() { $(this).show() } ... code going. At first I was not even thinking about this to be the problem for the gui delays. After some testing it was clear the delay
Deep copy - $.extend(true,...,...)
Hi all, There is a bug for me in method $.extend on deep copy of an object. The original code is: // Recurse if we're merging object values if ( deep && options[ name ] && typeof options[ name ] == "object" && target[ name ] && !options[ name ].nodeType ) target[ name ] = jQuery.extend(target[ name ], options[ name ] ); For me is: // Recurse if we're merging object values if ( deep && options[ name ] && typeof options[ name ] == "object" && ! options[ name ].nodeType ) target[ name ] = jQuery.extend(deep,target[
clone(true) still not working in jquery 1.2.3
i have this self.element.children('.cr_tab_content').append(self.element.children('#' + id).clone(true)); and this does nothing but self.element.children('.cr_tab_content').html(self.element.children('#' + id).html()); still works just does not copy trigger, is there anything wrong with that line of code with .clone()? Also this was testing in FF2 -- View this message in context: http://www.nabble.com/clone%28true%29-still-not-working-in-jquery-1.2.3-tp15326591s27240p15326591.html Sent from the jQuery
it's only 1 character
The closures around plugins, when concatenated together (e.g. via Rails 2.0) into one javascript file for production, can confuse the javascript parser - despite the fact there is a new line. I propose that there should be a semicolon at the first character to stop this. I.e. ;(function($) { rather than (function($) { I think it can confuse the closure as an argument of a function. I've mentioned it before and there's been some good uptake of the idea (e.g. http://dev.jquery.com/view/trunk/plugins/accordion/widget.js)
Possible IE clone() bug
Hi all, Firstly, thanks for producing such a great library - has halved the development time and previous code in my project :) I've run across a small problem in IE 6.0 under Win XP which I can't find mentioned elsewhere. The snippet of code I'm using is: $("#dstbl tr:last").clone(true).appendTo("#dstbl"); to replicate the last row in a table. This works fine in Firefox 2.0.0.11, however IE reports a Javascript error: 'nodeType' is null or not an object when this function fires. The line number
Announcing Starter Kit
Hey, I just wanted to say thanks for every one's hard work. As a way to give back, I started a project called StarterKit over at Google Code. The idea is to start providing demos of jQuery and BlueprintCSS and how they can integrate together. For starters I have included a demo of the interface slideshow. I am doing everything through SVN right now. I will try to update the Demos and Downloads tomorrow. Please, I would love help creating great demos. If you are interested in helping out, lemme know.
$().unbind('.namespace') added
You can now unbind all namespaced events in one easy call. This is very useful for cleanup in plugin development. Example: $('#foo').bind('click.bar', function() { ... }); $('#foo').bind('mousedown.bar', function() { ... }); $('#foo').bind('mouseover.bar', function() { ... }); // #foo now has three bound events $('#foo').unbind('.bar'); // #foo now has no bound events
Resize Event foes not work on elements
Hello, First let me say thanks to all for this wonderful library! I'm new here and might be overlooking something so I would like a little help to guide me alonng the way. For some reason the resize event is not being triggered in ff when the size of an element has been changed. This works great in IE but not in ff: Here's the code: $(function(){ $('#resize').resize(function(){ $(this).html('I have been resized!'); }) .click(function(){ $(this).width(200); }) }) Here's
Bug when a DOM element is passed to find() ?
Hi, I am jquery newbee and I *think* I ran into a bug with the find() method Details: jquery version : 1.2.1 (but looking at 1.2.2 I think it has the same problem) Browser : IE 6 & 7 Steps to reproduce: <html> <head> <script src="lib/jquery/jquery.js" type="text/javascript" charset="utf-8"> </script> <script type="text/javascript"> $(document).ready(function(){ var y=$('p')[0]; $("#load").find(y); //Should bomb on this line }) </script> </head> <body> ABC This is some
$.fn.show() bug
Hi people, once again I want to get attention for the .show() function, which doesn't work on visibility:hidden. I reopened the ticket on jquery.com: http://dev.jquery.com/ticket/2029 If you care to see for yourself whether an adjusted .show() function works, try Yereth flavoured jquery: http://www.yereth.nl/js/jquery-1.2.2-yereth.js I think it is rather intuitive that .show() doesn't have any restrictions on what kind of hiding is going on. Besides that, my version of jquery with an adjusted .show
expected behavior of multiple binds to same event on the document
<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "> I curious if I am making a mistake, (well I am but I'm wondering if my mistakes propagation is excepted).<div><br class="webkit-block-placeholder"></div><div>if I do something like:</div><div><br class="webkit-block-placeholder"></div><div>var counter = 0;</div><div><br class="webkit-block-placeholder"></div><div>for(var i=0;i<3;i++){</div><div><span class="Apple-tab-span" style="white-space:pre">
Problems with clone() of TR in IE 7 using jquery 1.2.2
Howdy: I am having problems with the clone() method of a table row in IE 7. It works fine in Safari and Firefox. If you want to see my code, it is available at http://web.mit.edu/sapweb/dontindex/demo/jquerytest/js/CreateChangeInit.html. The function is in the head of the page. The third line of the click callback uses clone() on a table row. Thanks for taking a look at this, - Mike
animate calculates the wrong height of element with implicit width
(From what I tested, this occurs in both 1.2.2 and 1.2.3) Example: http://paste.css-standards.org/31421/view Div with explicit width, contains ul with implicit width. Clicking ice hockey makes the next ul slide but apparently it "hickups" at the end because of misscalculated height. screenshot 1: http://img352.imageshack.us/img352/3453/screen1ry9.png Shows that the height is calculated correctly after the ul is slided. screenshot 2: http://img352.imageshack.us/img352/4151/screen2tt0.png Shows the
The Tabs Page is showing a 404 for JQuery Site
Team, FYI: I got a 404 when trying to go to the following page: http://dev.jquery.com/view/trunk/ui/current/ui.tabs.js It's used on the following page: http://docs.jquery.com/UI/Tabs Question: I am actually using the url in my code as well. Should I just download the latest version and call the code from my site? Or use the url as described in the demo? Thanks, Mike.
Offset test suite...
I just committed the beginnings of the offset test suite. It pops up a new window to isolate the test cases, so it requires that you enable your pop-up blocker to run the tests. <a href="http://brandonaaron.net/jquery/jquery/test/offset.html"> http://brandonaaron.net/jquery/jquery/test/offset.html</a> You can also access the individual fixtures to run a visual test as well. Just click on any of the white boxes to move the grey marker. <a href="http://brandonaaron.net/jquery/jquery/test/data/offset/relative.html">
Some valid criticisms of jQuery
Most critique is poor but these seem very valid. http://www.danwebb.net/2008/1/31/low-pro-for-jquery In particular the closures around the plugins mean that you cannot modify the behaviour of plugins without monkey patching. I don't know if there's a way round this ? Also jQuery doesn't offer a way to OO your code (unlike prototype for instance). Obviously this probably falls out of its remit, but it would be interesting if there was a recommended framework ? The javascript for 64squar.es has got
Issue on using Object.prototype and jQuery
I was just wondering...kidding, I'm actually facing the problem. I created the following method: Object.prototype.keys = function(filter_fn) { // gets all keys and filter them using filter_fn function (if defined) var e, r = []; filter_fn = filter_fn ? filter_fn : function() { return true; }; alert(123); for(e in this) { if(!(e in Object.prototype)) filter_fn.call(false, this, e) && (r[r.length] = e); } return r; }; But jQuery executes it without my permission when I call: $(function () {...}); Big
Request header not being set.
Request header is not being set when making an ajax request. its setting default('*/*') header despite dataType being 'script'. I tracked it down, for some reason the ajax function is returning from line 2631 of regular jquery 1.2.2 download (http://code.google.com/p/ jqueryjs/downloads/detail?name=jquery-1.2.2.js) . I commented that line and it seems to be setting the headers properly now.
Bug in "nodeType" attribute selector, e.g. not('[nodeType=1]') in IE after upgrading to jQuery 1.2.2?
(Reposting this from jQuery mailing list, as Karl pointed out to me that it would be better suited here) All, in jQuery 1.2.1 I was using the following snippet, which I actually more or less took from the documents example page: $('p').contents().not('[nodeType=1]').replaceWith(' '); I used this to empty out some text nodes I couldn't control otherwise but leave other HTML elements alone. That wasn't working in IE any longer after I upgraded to jQuery 1.2.2. The following is: $('p').contents().filter('[nodeType=3]').replaceWith('
Fix show etc. in Konqueror - without even adding a new line
All, currently in Konqueror the show and fadeIn methods do not work at all for elements hidden via CSS. This is because curCSS('display') returns an empty string in Konqueror for such elements, all this happens in line 853 in core.js and this isn't taken into account: ret = getComputedStyle.getPropertyValue( name ); While assuming an empty string means "none" in that case, I fixed it by changing the line to this: ret = getComputedStyle.getPropertyValue( name ), ret = name == 'display' && !ret ? 'none'
AJAXForm, execution permissions and thumbnails...
Hi All, I'm a relative newcomer to jQuery but am loving it so far. Slight issue. As always, everything will work wonderfully on my own machine, but bails when I get to running it live... I'm using an ajaxform to allow users to upload an avatar/image to their user profiles. For whatever reason, I'm storing the image as a blob in sql (through Propel). The form itself contains an ajax style avatar preview, triggered when a file is uploaded to a temporary area, and a submit button that commits the image
Help Test jQuery 1.2.3
Hey Everyone - I put up an alpha build of jQuery 1.2.3 last night. This includes just a couple, important, bug fixes over 1.2.2. Dropping this into your (already migrated) app shouldn't cause any problems. Let me know if you hit anything new. http://code.jquery.com/jquery-1.2.3a.js --John
.show() bug review
Hi people, once again I want to get attention for the .show() function, which doesn't work on visibility:hidden. I reopened the ticket on jquery.com: http://dev.jquery.com/ticket/2029 If you care to see for yourself whether an adjusted .show() function works, try Yereth flavoured jquery: http://www.yereth.nl/js/jquery-1.2.2-yereth.js I think it is rather intuitive that .show() doesn't have any restrictions on what kind of hiding is going on. Besides that, my version of jquery with an adjusted .show
jQuery/JavaScript Jobs
Hey Everyone - I just posted a whole bunch of JavaScript/jQuery jobs to my blog, in case anyone is looking for work: http://ejohn.org/blog/javascript-jobs/ Hope this helps! --John
fadeIn problem in Safari 2.0.4
Hi all, I´m a newbie in jQuery, so I do have my first problem. I´ve the jQuery version 1.2.2 and I´m using a Safari 2.0.4 on a MAC. I want an <ul> to fade in when DOM is ready - it works perfectly on every browser, but not on Safari 2.0.4. Here is my js-code: $(document).ready(function() { $("ul#fadein").fadeIn(2000); }); And here my HTML: <ul id="fadein"> <li id="li_active"><a href="reichenbach.html">Reichenbach</a></li> <li><a href="lucile_grahn.html">Lucile-Grahn- Strasse</a></li>
Problem with nested uls and IE6/IE7
Hi, I have some problem with a nested menu on IE6/IE7. It works perfectly in firefox/oper/safari on windows and in firefox/safari on mac. Is this a bug, there is some workaround? This is the HTML code: <ul id="menu"> <li> <a href="#">PROJECTS</a> <ul class="submenu"> <li> <a href="#">MARKET SEGMENT 1</a> <ul class="submenu2"> <li> <a href="#">MARKET SEGMENT 1</ a> </li> <li> <a href="#">MARKET SEGMENT 2</ a> </li> </ul> </li> <li> <a href="#">MARKET SEGMENT 2</a> </li> </ul> </li> <li> <a href="#">NEWS
~= attribute selector
Original: http://labs.cloudream.name/jquery/~=selector.html jQuery treat ~= as *= in selector.js line 347 (type == "*=" || type == "~=") && z.indexOf(m[5]) >= 0) Modify: http://labs.cloudream.name/jquery/~=selector2.html type == "*=" && z.indexOf(m[5]) >= 0 || type == "~=" && (' '+z+' ').indexOf(' '+m[5]+' ') >= 0) I know its design for this, but i think it's useful to part. (is ~= a stupid, stupid, worthless selector? what about |= for other language users? such as [hreflang|=zh] for zh-cn/zh-tw
jquery support forum and chat
Hello. I'm new to jquery. I was just wondering if the leads seem happy with the google groups and IRC method of communication. Personally, I found IRC a little different to use because I haven't done it before. I was wondering if it would be useful to have a standard forum and chat program on another site. I have a server that I may be able to host them on. Has anyone offered this before or do you think it would be useful? Thanks, Michael
Dashboard Widget: Need latest docs
<span style="border-collapse: collapse;">Hi All.</span><div><span style="border-collapse: collapse;"> </span></div><div><span style="border-collapse: collapse;">I'd like to update the dashboard widget but can't seem to find the docs in json format as before. Any ideas where these might be located? </span></div><div><span style="border-collapse: collapse;"> Thanks! </span></div><div><span style="border-collapse: collapse;"> Ryan Dunphey</span></div>
sorry brandon
<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "> Brandon Aaron is not Aaron Boodman... I'm so embarrased and hope your not offended. I read your blog and see you on the list all the time but my dyslexic-tourette syndrome got the best of me again. Hope you can forgive me this once!<div> <div> <span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size:
Callback stack for dynamically loaded jQuery
Hi - would it be possible to add a 'callback stack' that jQuery would traverse once it is loaded? This feature would be especially useful when jQuery is dynamically loaded through a e.g. document.write. Many thanks, Jean-Lou Dupont http://jldupont.com
select() demo fails in IE6/7
http://docs.jquery.com/Events/select
attr('href')-Bug
Just found an amazing bug of jQuery (used Version 1.2.2): I just tried to replace the href of links of a site by prepending a tracking-URL: $(function() { $('a').each(function() { $(this).attr('href', 'http://www.tracking.com/?url=/'+escape($ (this).attr('href')) ); }); }); This function replaces the linktext in IE, if it's equal to an URL This works: <a href="http://www.google.com/">Google</a> ===> <a href="http:// www.tracking.com?url=http%3A//www.google.com/">Google</a> This doesn't work: <a href="http://www.google.com/">http://www.google.com</a>
Bug 2190
http://dev.jquery.com/ticket/2190 I am trying to debug this bug a bit further since it break Jeditable for me. I have hard time understanding what and why the following lines do (taken from around line 800 of jquery-1.2.2.js): -cut- if ( jQuery(elem).is(":visible") ) getWH(); else jQuery.swap( elem, props, getWH ); -cut- -- Mika Tuupola http://www.appelsiini.net/
eval vs. Function
I posted this to the jQuery group, but it was suggested I post it here instead. A question for the jQuery team: I look at the jQuery source code as my source for Javascript best practices, and I see a few examples of things like: fn = eval("false||function(elem){return " + fn + "}") What is the advantage of that over using Function, as: fn = Function('elem', 'return '+fn) which seems to do what you want more clearly and concisely.
Very sorry
Dear list, I am very sorry to post my question in "Developpers List". Please ignore my message and be a nice day all. - philsci
Can not capture single click at onClick on Firefox
Dear list, I have put these code up to make a simple test page. <code> ------------------------------------------- <div class="answers" id="q2_1_8_1" onclick="getReply('q2_1_8_1');">Answer 1<span class="true">True!</ span><span class="false">False</span></div> </code> ------------------------------------------- When you click (yes single click) the text "Answer 1", the following code fires. <code>------------------------------------------- var answers = new Array(); answers[ 'q2_1_8_1' ] = 'F'; function
Selected checkboxes and val()
This might be a dead horse, but wanted to re-ask the question: Why does calling val() on a group of selected checkboxes (same name attribute - if it matters) not return an array of values? Example: http://www.ericmmartin.com/code/jquery/checkbox.html I see that there is code to handle a multiple select. Also, I know that Mike's form plugin can return the array, but I'd think this "feature" would be part of the core. Thoughts?
Next Page