[jQuery] Documentation stylesheets

2008-12-12 Thread 703designs
Just wanted to let you guys know that your documentation CSS is jacked up: http://docs.jquery.com/Plugins/Validation/validate Print stylesheet's no better (arguably worse, given the media). Thomas

[jQuery] Re: How beneficial is chaining methods?"

2008-12-03 Thread 703designs
There's nothing special about chaining methods. You can do it in most decent languages (in PHP, you could design methods to allow something like: $toys->addNew("Block")->delete();) and all it involves is returning an instance of the current object. It's not a performance hit by any means. A chain

[jQuery] Re: Scope variables in anonymous functions?

2008-12-03 Thread 703designs
ice visual resemblance between the variable > name and the original $() call. Single quotes let you avoid escaping double > quotes inside a string - typically a more common case than the other way > around, because of HTML attributes - plus they're easier to type. :-) > > -Mike

[jQuery] Re: Scope variables in anonymous functions?

2008-12-03 Thread 703designs
his" or something > similar. > > Also within the anonymous function you can do this: > siblings.find( etc ); > category.find( etc ); > > ...since they are already jQuery objects. > > -- Josh > > -Original Message- > From: jquery-en@googlegroups.com [

[jQuery] Scope variables in anonymous functions?

2008-12-03 Thread 703designs
What I'm trying to figure out is how I can access parent scopes from a nested anonymous function. As you can see here, I'm managing to do this by assigning "this" to variables, but I know that there's a way to pass "this" into the anonymous functions: $(".responsibleCouncil .category").each(funct

[jQuery] Re: Can't retrieve "title" attr from ; no problem with other attrs

2008-12-02 Thread 703designs
firm > > name="Alabama"> > > $("area").tooltip({ >         delay: 0, >         fade: 250, >         bodyHandler: function() { >             var content = $(this).attr("state"); >             console.log(content); >             return $(&quo

[jQuery] Can't retrieve "title" attr from ; no problem with other attrs

2008-12-02 Thread 703designs
Using: $("area").tooltip({ delay: 0, fade: 250, bodyHandler: function() { var content = $(this).attr("title"); console.log(content); return $("").html(content); } }); console logs empty returns and the tooltip is empty.

[jQuery] A better way to refill form values?

2008-10-27 Thread 703designs
Here's what I have right now: $(document).ready(function() { $("form input:text").focus(function() { this.oldvalue = $(this).attr("value"); $(this).attr("value", ""); }).blur(function() { $(this).attr("value", this.oldvalue) }) }) But I'm sure it could be writ

[jQuery] Re: JS Question: How does this jQuery idiom work?

2008-10-16 Thread 703designs
stuff. > > })(jQuery); > > That's it. The syntax just defines an anonymous function and then   > invokes it right away. Now everything inside your anonymous function   > will have a private reference to the $ variable, and it will be bound   > to jQuery. > > I hope

[jQuery] Re: JS Question: How does this jQuery idiom work?

2008-10-15 Thread 703designs
I still have no idea what's going on syntactically, but now I know what's happening. This reinforced the concept (writes "Poop!" to the screen): (function(poop) { document.write(poop); }) ("Poop!") On Oct 15, 10:00 am, "chris thatcher" <[EMAIL PROTECTED]> wrote: > It's very important becuase

[jQuery] JS Question: How does this jQuery idiom work?

2008-10-15 Thread 703designs
Plugins are supposed to use this: (function($) { // Plugin code }) (jQuery) I know what it does (allows the use of $ within the script), but how does it actually work? Is it somehow casting the function object as the jQuery object? It always seemed odd to me, and I haven't seen this idiom el

[jQuery] Re: How to avoid throbbing "Hover" actions?

2008-10-14 Thread 703designs
t; > Alexandre Plennevaux > > Lakensestraat 104 Rue de Laeken > Brussel 1000 Bruxelles > België _ Belgique _ Belgium > > tel: +32 (0)2 2196555 > fax: +32 (0)2 4266986 > > mail: [EMAIL PROTECTED] <[EMAIL PROTECTED]>http://www.lab-au.com > VAT: BE0475.210.720 >

[jQuery] Re: How to avoid throbbing "Hover" actions?

2008-10-14 Thread 703designs
x', >                     marginTop: '25px', >                 }, "normal") >             }); > > - ricardo > > On Oct 13, 5:05 pm, 703designs <[EMAIL PROTECTED]> wrote: > > > Using either $.fn.hover or $.fn.mouse(over|out), I can'

[jQuery] How to avoid throbbing "Hover" actions?

2008-10-13 Thread 703designs
Using either $.fn.hover or $.fn.mouse(over|out), I can't figure out how to prevent my animations from firing repeatedly. You'll see what I mean: http://703designs.com/jQuery/port.php (view source to see what's going on). How would I change this so that the over/hover event can't fire until the el

[jQuery] Advanced JS/jQuery Question: RTEs

2008-10-02 Thread 703designs
Fundamentally, how do the editors like TinyMCE work? Every RTE implementation I've seen uses an iframe, and I have no idea what goes on after that. Anyone here know the answer to this?

[jQuery] Re: animate problem when using ems and ie

2008-10-02 Thread 703designs
Could you please post this page in full, or better, upload it and post the URL? Then we can test what's going on easily. I will say that animate seems a little buggy to me, so I wouldn't be surprised if you're right. On Oct 2, 10:42 am, ThatSteveGuy <[EMAIL PROTECTED]> wrote: > Has anyone had a p

[jQuery] Best Practices: Separating HTML from JavaScript

2008-10-02 Thread 703designs
I'm always looking for as loosely coupled a system as practical, and I have a question about separating HTML from JavaScript (using jQuery). What's the best way to apply a "template," so to speak, to some JS method? I'm trying to create a button bar for a plugin, and it has to be loaded in dynamic

[jQuery] Re: text() as a wrapped set?

2008-09-26 Thread 703designs
Oh, and break everything that depends on the text method. On Sep 26, 9:16 am, 703designs <[EMAIL PROTECTED]> wrote: > I could also do something along these lines: > > $.fn.oldText = $.fn.text; > $.fn.text = function() { >     return $(document.createTextNode(this.oldText()

[jQuery] Re: text() as a wrapped set?

2008-09-26 Thread 703designs
pe too: > > String.prototype.jqueryify=function(){ >   return $( document.createTextNode( this ) ) > > } > > $('a').text().jqueryify().appendTo("#sanbox"); > > On Sep 24, 8:27 pm, 703designs <[EMAIL PROTECTED]> wrote: > > > Because the text method

[jQuery] text() as a wrapped set?

2008-09-24 Thread 703designs
Because the text method returns a string, it's missing appendTo and other methods. Now, of course I can do this: $("#sandbox").text($("a").text()); But I'd prefer to do this: $("a").text().appendTo("#sanbox"); What goes between text and appendTo? Or is the first example the best way to do this

[jQuery] Find and replace all instances of a string with another string?

2008-07-10 Thread 703designs
Let's say I want to replace all instances on a page of "golf" with "football" (just plain text). How would I do this with jQuery?

[jQuery] Re: Some optimization

2008-06-24 Thread 703designs
Note: I'm not going to directly answer your question. If you're paging over this many rows, I imagine that there's a server- side language involved. You should do one of two things: Either paginate the results, making jQuery's job easy, or take jQuery out of the equation and add classes according

[jQuery] Re: Selector: Find the first letter?

2008-06-10 Thread 703designs
$(this).html(text.replace(/([A-Z0-9])/g,'$1')); }); }); On Jun 10, 3:39 pm, 703designs <[EMAIL PROTECTED]> wrote: > I want to add a class to the first letter of every link in a page's > navigation. Here's what I have now, but I'm missing a way

[jQuery] Selector: Find the first letter?

2008-06-10 Thread 703designs
I want to add a class to the first letter of every link in a page's navigation. Here's what I have now, but I'm missing a way to actually grab the first letter. This script would add the "caps" class to the whole link, and I only need the letter. The reason for this is that the links are using "fo

[jQuery] How do I check a parent element?

2008-05-14 Thread 703designs
I want to check if a parent element is . How do I do that? The best I know of now is to add a class to these and test hasClass() for it.