[jQuery] Re: ajax :: how to load script

2009-01-15 Thread James Van Dyke
The simple solution would be to use $.getScript(url, callback). However, know that if you insert HTML anywhere in the page using jQuery, it will search for and execute any script tags in that HTML automatically. For example: $.get('/my/url/with/html_and_jscript.html', function(data) {

[jQuery] Re: Condense this function

2009-01-15 Thread James Van Dyke
, or as few as one or two. Its pretty neat, and its working right now, but I'd love to better understand your method. Thanks again! D On Jan 15, 12:21 am, James Van Dyke jame...@gmail.com wrote: Let me know what's not working, and maybe I can help you out.  I don't have firebug handy, so I

[jQuery] Re: Performance penalty for creating dom element from a string?

2009-01-14 Thread James Van Dyke
img is a tag which doesn't require an ending tag. input is another as is br. The W3C validator will actually warn you if you end tags like that, though it's not a big deal. When jQuery creates the HTML, I believe the code is injected into an empty element and jQuery sees what the browser made

[jQuery] Problems with the New API Browser

2009-01-14 Thread James Van Dyke
Does anyone else find the new API browser to be a bit cumbersome? My gripes: 1) No back link at top of vertical navigation list. You must click the category to cancel your choice and essentially go back. However, this isn't very intuitive and there aren't any affordances to this behavior

[jQuery] Re: Condense this function

2009-01-14 Thread James Van Dyke
$(function() { var i, numStickies = 9; for (i = 1; i = numStickies; i += 1) { setTimeout( function() { $(.sticky + i + :hidden).fadeIn(500); }, 100 * i); } }); Not sure if that's faster, but it's shorter and easier to change. On Jan 14, 11:19 pm,

[jQuery] Re: Issue upgrading to 1.3

2009-01-14 Thread James Van Dyke
Try $(#emilyLogin:not(.loggedIn), #joeLogin:not(.loggedIn)).click( function(){} ); I'm thinking that the nested IDs are causing issues that the new selector engine can't handle. Since IDs are supposed to be unique per page, listing a hierarchy is unnecessary. Multiple IDs on a page would

[jQuery] Re: $(area) not working in IE (sorry if this is a repost)

2009-01-14 Thread James Van Dyke
Ok... that's a hard page to get away from with all those alert boxes. I know... no Firebug in IE. Poo. I believe that class is not what IE calls that attribute. For instance, element.class will return nothing. element.className is the correct property. Try that. Plus, you could shorten your

[jQuery] Re: IE Problem with (function($)

2009-01-14 Thread James Van Dyke
The initial (function($) { was never closed. Here's how I formatted it so everything lines up: (function($){ var EYE = window.EYE = (function() { var _registered = { init: [] }; return {

[jQuery] Re: Standards box model

2009-01-14 Thread James Van Dyke
I've always used transitional and had no problems, even with 1.3. Transitional is still a standard, but let's some things slide. However, if you're so concerned with bugs, you may want to wait until 1.3.1 or later. 1.3 is bound to have some lurking issues. On Jan 15, 12:15 am, Karl Rudd

[jQuery] Re: Condense this function

2009-01-14 Thread James Van Dyke
:28 pm, James Van Dyke jame...@gmail.com wrote: $(function() {     var i, numStickies = 9;     for (i = 1; i = numStickies; i += 1) {         setTimeout( function() {             $(.sticky + i + :hidden).fadeIn(500);         }, 100 * i);     } }); Not sure if that's faster

[jQuery] Re: getJSON - how to retrieve plain text?

2009-01-14 Thread James Van Dyke
It's almost certainly giving you an error about cross-domain XHR requests. Simply, you can't call URL's that start with http://; or else it will throw an error. Someone else may know how to get around that, but if you're referring to your own host, just use a relative path. To debug the issue,