[jQuery] jQuery and the geo microformat
Hello, I've started a modest blog in French about jQuery, mainly to document what I learn, and show to SPIP users how to use it. So it's mostly constituted of very simple examples and "discover" articles. My latest article is an example of processing the geo microformat with jQuery. Nothing difficult, but I think it's a nice way to show of how these two techniques can mix, this is why I care to mention it here. The example is at http://www.jquery.info/IMG/html/5_geo.html explanations (in French)
[jQuery] Using "." in id attributes confuses jQuery
I was playing around with jQuery today, and I came across something unfortunate. I was in the habit of using the "." character in id attributes. For example, if I had a page full of notes, the mark-up might look like: <div class="note" id="note.3">3rd note</div> <div class="note" id="note.4">4th note</div> What's unfortunate is that: $('#note.3').size() == 0 $('note.3').size() == 0 The lesson here might be that even though "." is a legal character[1] to have in an id field, its existence in an id
[jQuery] Anyone explain why this won't work in Safari
The following seems to work as intended in Firefox and IE, but it won't in Safari: //Code here creates an image array and selects an image at random and has been removed to save space... $(document).ready(function(){ $("div#leftcol").css({background:"#fff url("+leftimg[randleft]+") top left no-repeat"}).fadeIn("crawl"); }); $(document).ready(function(){ $("div#twocols").css({background:"#fff url("+rightimg[randright]+") bottom right no-repeat"}); }); The site is located at http://www.aliasenterpises.com.
[jQuery] Rebind events on dynamic content (modified DOM)
> > > > From: Michael Geary
[jQuery] rev. 217: Bugfix in $.fn.serialize
> Anyway, long story short, i changed this: > a.push({name: n, value: this.value}); > }); > into > a.push({name: n, value: this.value}); > }).end(); > Although this fixes the bug, it is confusing to me when we sometimes > need an "end" and sometimes not with the each() command. That can't be the correct permanent fix, though; something else is messing up the object elsewhere. Looking at the $() constructor in SVN I see this: // Watch for when a jQuery object is passed at the context if ( c && c.jquery
[jQuery] rev. 217: Bugfix in $.fn.serialize
@John, please read since the "each" function could still contain a bug (see bottom 2 lines) Hi guys, I've just committed a bug fix to the form plugin. As you might have seen, I noticed that i somehow got an fieldset element instead of a form element in the $.fn.ajaxSubmit function. By doing a traceback i noticed that the following code would produce "HtmlFormElement" and "HtmlFieldsetElement", so the bug was in the serialize function.: alert(this[0]); if ( !this.vars ) this.serialize(); alert(this[0]);
[jQuery] Problem with ajax+IE
Hi buddies, I have some problems running ajax in IE, the same code works great in mozilla firefox. my code is something like this : $.ajax({ url: ''http://myUrl'), type: "GET", error: function() {alert('eerrrr');}, success: function(http) { var xml = http.responseXML; var div = $('.tableParent', xml).get(0); alert(div.innerHTML); $('.tableParent').get(0).innerHTML = div.innerHTML;//http.responseText; installSortableTable($('div.tableParent
[jQuery] Is there a simple way to break out of.each(function(){....});
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD> <META http-equiv=Content-Type content="text/html; charset=us-ascii"> <META content="MSHTML 6.00.2900.2963" name=GENERATOR></HEAD> <BODY> <DIV dir=ltr align=left><SPAN class=875532521-18082006><FONT face=Arial color=#0000ff size=2>There was some discussion of this on the list earlier (June?) but it doesn't look like there is currently a way to break out early. You could wrap the each in a try/catch and then throw from your
jQuery Boston
Hey Everyone - Just wondering if there's any jQuery users here in Boston, MA - I'm going to be giving a presentation on jQuery on the 24th for the local Drupal group. I'm not sure if it'll be recorded and/or transcribed - but I'll be sure to throw any slides or examples online after its done. More info here: http://drupal.org/node/79481 I'd love to be able to do a jQuery meetup sometime, maybe in association with a big conference (OSCON, AJAX Experience?) But that's for another post. --John
[jQuery] Addition of loadSuccess call back
The following problems can be solved by adding the loadSuccess call back. Problem: Plug-in cannot notice contents added with $().load(). For instance, Thickbox plug-in can be used only by adding class="thickbox" to the link. However, it doesn't operate well for contents of $().load(). Solution: I add the loadSuccess call back to jQuery. When $().load() is done, the loadSuccess call back is called. Loaded HTML is passed to the argument of the call back. The call back processes loaded HTML again. Sample:
[jQuery] Safari doesn't like show()
Hi list, After converting a drop-down menu script to jquery, our designer pointed out that the menu was no longer working under Safari. I have tracked this down to the use of "show()" which, while it works perfectly under Firefox and Opera, does not seem to do anything under Safari. It does work when called as "show('fast')" or similar, however the animation effects are not desired. The best compromise I can come up with is to call it with a value of 1, however it still leads to a short delay before
[jQuery] Possible Safari bug with :hidden property
I am running up against an issue I see in Safari. Lets say I have a <div> with some content in it assigned a class of 'myClassName'. I then tell that class to be 'display: none;' in the CSS. Now for the odd part... When I ask $(".myClassName:hidden").show (); it doesn't show up!? So I made a test page up that checks $(".myClassName").is(":hidden") and what do you know, Safari says that it's visible not hidden! Am I doing something wrong here? NOTE: I have tried the same code on http://jquery.com/src/latest/
[jQuery] $(window).height() / .width()
$(window).height() and .width() cause the error "e.style has no properties". I think it would be preferable to modify .height and .width to handle window objects as a special case. A quick Google suggests using window.innerWidth, or where that is undefined document.body.offsetWidth. I just tested $('html').width() in Firefox 1.5.0.6 and IE6 and it returns the width of the window even when $('body').width() is explicitly set as lower. Therefore, I believe $('html').width() would be preferable to document.body.offsetWidth.
[jQuery] Is there a simple way to breakout of.each(function(){....});
> Yeah, I had suggested returning an explicit false from your
[jQuery] Live Grid feature requests
<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:st1="urn:schemas-microsoft-com:office:smarttags" xmlns="http://www.w3.org/TR/REC-html40"> <head> <meta http-equiv=Content-Type content="text/html; charset=us-ascii"> <meta name=Generator content="Microsoft Word 11 (filtered medium)"> <o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags" name="City"/> <o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
[jQuery] XPath
Hello I have the following structure: <dl> <dt><a href="url">x</a></dt> <dd>text</dd> </dl> I select the <a> element in this, and I want to show() the corresponding dd. This works but is not very precise: $("../../dt/../dd", this).show(); I'm trying to write it more precisely with something like: $("parent::dt/parent::dl/dd", this).show(); but I'm not finding the correct expression... -- Fil _______________________________________________ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
[jQuery] Any IE6 related input element changes recently?
That is a good reference. Is there a getting-started-style guide somewhere? Also, has anyone worked on how-do-I style FAQs or equivalent functions between standard DOM or other frameworks? If not I can work on some of that. It might be useful to have the built-in documentation specify categories for the functions to make some sort of automatic cross-reference easier. So for example .addClass() might have "@keywords class, className". I haven't totally thought through how that would be used. -----Original
[jQuery] Is there a simple way to break out of .each(function(){....});
The subject says it all. ;)<br clear="all"> -- Shawn Tumey Cofounder MT Web Productions LLC _______________________________________________ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
[jQuery] Any IE6 related input element changes recently?
In Internet Explorer 6, via MS Script Editor [during a debug]: > document.getElementsByTagName("input") {...} length: 20 > $("input").size() 0 It works normally in firefox, so i don't understand why it doesn't in IE5. I thought jquery used getElementsByTagName internally when it could. I'll keep digging, I was curious if anybody else got this error. _______________________________________________ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
[jQuery] Rebind events on dynamic content (modified DOM)
You are calling BindTimeSelectors before the AJAX load is complete. Which AJAX load is the one that BindTimeSelectors depends on? Assuming it is the second one, you could code it like this: $("#daysheader").load( "ajax/weekview_headers.aspx?fromdate=" + calendarDay.Date ); $("#days").load( "ajax/weekview_appointments.aspx?fromdate=" + calendarDay.Date, BindTimeSelectors() ); Also, the code that wires up the events could be simplified considerably. Are you able to give each of those DOM elements a
[jQuery] Find first element (child)
Hello, I would like to use .find, but only for the first element of the results. If I have <a> link 1 </a> <a> link 2 </a> and I do $("p").find("a").hide(); this hides both links. I would only like to hide the first. Can I do this with find, or can I use $("p").children()? Cheers, Julius Lucks<br clear="all"> -- ----------------------------------------------------- <a href="http://openwetware.org/wiki/User:Lucks">http://openwetware.org/wiki/User:Lucks</a> -----------------------------------------------------
[jQuery] ToggleClass and parents();
With a checkbox inside of a label, I was trying to toggle a class on the label based on whether the input was checked or not. I tried every permutation of: $(".checkbox").change(function(){ $(this).parent().toggleClass('selected'); }); <label for="test"><input id="test" type="checkbox" class="checkbox />Test</label> Tried both the dev and the current jquery. Any idea what I'm doing wrong? _______________________________________________ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
[jQuery] jquery & DOM Caching
> Has any thought been given to a plugin or a modification to jquery
[jQuery] Extraneous whitespace in jquery-svn.js
Purely cosmetic, but has anyone noticed that there is extra whitespace in the generated jquery-svn file (http://jquery.com/src/jquery-svn.js). Go to the jQuery.macros definition (line 931) and you will see the space underneath it (above css). It also occurs soon after the DOM Ready code (1132 onwards). Removing it saves around 300 bytes. However, that won't make any difference to the compressed version (which is probably what most will use on a live site). _______________________________________________
[jQuery] What happened to visual jquery?
<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns="http://www.w3.org/TR/REC-html40"> <head> <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii"> <meta name=Generator content="Microsoft Word 11 (filtered medium)"> <!--[if !mso]> <style> v\:* {behavior:url(#default#VML);} o\:* {behavior:url(#default#VML);} w\:* {behavior:url(#default#VML);} .shape {behavior:url(#default#VML);} </style>
[jQuery] What happened to visual jquery?
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD> <META http-equiv=Content-Type content="text/html; charset=iso-8859-1"> <META content="MSHTML 6.00.2900.2963" name=GENERATOR></HEAD> <BODY> <DIV><SPAN class=798244119-18082006><FONT face=Arial color=#0000ff size=2>It's there for me now.</FONT></SPAN></DIV> <DIV><SPAN class=798244119-18082006><FONT face=Arial color=#0000ff size=2></FONT></SPAN> </DIV> <DIV><SPAN class=798244119-18082006><FONT face=Arial color=#0000ff size=2>Could
[jQuery] New Plugin: jQMinMax - Add min-/max- height & width support
>> Jason Levine
[jQuery] New Plugin: jQMinMax - Add min-/max- height & width support
Hello again, folks. "jQMinMax is a jQuery plugin that adds support for min-width, max-width, min-height and max-height where they are not natively supported." This is a plugin based on some earlier work I did. It's tidied up a bit, though the min-height bug I mention before persists in the latest svn: http://www.nabble.com/%24%28foo%29.css%28%27min-height%27%29-bug--tf1965908.html#a5394938 Best wishes, Dave Cardwell ~ http://davecardwell.co.uk/ _______________________________________________ jQuery
[jQuery] Oneliner to prevent click-to-activate (EOLA) in IE
Say you have a flash movie embedded in a container with the id "introduction". To prevent activate to click in IE, do this: $('#introduction').html( $('#introduction').html() ); I love jQuery. It lets me embed my flash standards compliant and saves me some kilobytes for the swfobject js... To be as fast as possible I put the following snippet immediatly after the flash (as an exception I don't care for unobtrusiveness here): <!--[if IE]> <!-- prevent activate to click --> <script type="text/javascript">
[jQuery] Oneliner to prevent click-to-activate (EOLA) in IE
Say you have a flash movie embedded in a container with the id "introduction". To prevent activate to click in IE, do this: $('#introduction').html( $('#introduction').html() ); I love jQuery. It lets me embed my flash standards compliant and saves me some kilobytes for the swfobject js... To be as fast as possible I put the following snippet immediatly after the flash (as an exception I don't care for unobtrusiveness here): <!--[if IE]> <!-- prevent activate to click --> <script type="text/javascript">
[jQuery] Wierd bug?
> (for convenience, the comments are stripped): That sums up my thoughts about most comments. :-)
[jQuery] Bug in $Rev: 216 - slide does not work
Hi, it seems to me that in the latest Revision there's a bug in the slide function (or maybe in the function that retrieves the height of an element). See here (slide example): http://stilbuero.de/jquery/tabs/ Opera reports huge negative values in the error console: CSS - http://stilbuero.de/jquery/tabs/ DOM style property Invalid value for property: height Line 1: -2126851999px That height bug has already been reported (#76) - it happens not only on Mac by the way - but maybe this is related to
[jQuery] Error in current jquery version
Hallo, I have tried to use jquery for a current project. To test it, I have created following code: <pre id="line1"><span id="__firefox-tidy-id" style="background-color: rgb(221, 221, 255);"><<span class="start-tag"> html</span>></span> <span id="__firefox-tidy-id" style="background-color: rgb(221, 221, 255);"><<span class="start-tag">body</span>></span> <<span class="start-tag">title</span>>JSON-Test</<span class="end-tag"> title</span>> <<span class="start-tag">script</span><span class="attribute-name">
[jQuery] Wierd bug?
I found a bug in 216. I am still using the ajaxForm functions created by Mark C, however, using SVN 216, something changed so they don't work anymore. I can't produce a test page at the moment, but i hope John knows what is wrong. Anyway here is the case In the function " $.fn.ajaxForm " there is this code: e.preventDefault(); $(this).ajaxSubmit(target, post_cb, pre_cb); return false; When i do an alert on "this" i get the form element. (this is correct) Here is the wierd thing: You can see it assigns
[jQuery] Why is Opera so slow (especially for thickbox) ?
Hi, here is a question, just for curiosity. I've often observed a real difference of performance between FF and Opera. This is particularly visible for some jquery plugins : if you look at this exemple : http://www.tweosc.org/example/jquery-addressbook/ Opera is really sloooooow.. Does anybody know what does Opera during all this time ? Isn't it the auto-proclamed "fastest browser of the world" ? Is it due to thickbox ? Or to the DOM manipulation by jquery ? Cheers, .Gilles _______________________________________________
[jQuery] Multiple $(document).ready()'s...
Let's say I am creating a set of code snippets that end users will have the ability to place in various locations throughout a site. I'd like to keep all the code for a specific snippet in a single file. But if several of those snippets use jquery, that means I'll potentially have several $(document).ready()'s in a single page. Is that bad? Or does it not matter... Thanks, Jason -- View this message in context: http://www.nabble.com/Multiple-%24%28document%29.ready%28%29%27s...-tf2122871.html#a5856114
[jQuery] Any IE6 related input element changes recently?
> It works normally in firefox, so i don't understand why it doesn't in IE5. Sounds like you meant IE6, it's working fine in IE6 for me (SVN 169 was what I had handy). What version of jQuery are you using? Going to jquery.com I did notice that it's very easy to grab an ancient version of the code. The "latest" version is from May. Since John's only days away from the 1.0 release that problem should go away--and be replaced by calls for updated documentation. :-) _______________________________________________
[jQuery] New to jquery - how do I...
> You can start your search by looking into Interface (for jQuery) which
[jQuery] JSON Arrays *tad off topic hehe*
I am useing JSON.php to convert my mutli demional array in to json. I am just posting it in to a var for now testing the innerhtml creates i need some help on figuring out how to access the array once in the js block. http://3spn.net/jQuery/dom_creation.html I have constructed a dummy array that is the same as the php ajax responce will put out. I did double post this to a point i moved it out side of the dom creation topic header! :) _______________________________________________ jQuery mailing
[jQuery] New to jquery - how do I...
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD> <META http-equiv=Content-Type content="text/html; charset=us-ascii"> <META content="MSHTML 6.00.2900.2963" name=GENERATOR></HEAD> <BODY> <DIV><FONT face=Arial size=2><SPAN class=865474619-17082006><SPAN class=865474619-17082006>I wanted to solicit help here to jump-start my first jquery development... </SPAN>I've some experience with prototype.js, and would like to start a small project using jquery. </SPAN></FONT></DIV>
Next Page