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
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
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
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 [
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
firm
>
> name="Alabama">
>
> $("area").tooltip({
> delay: 0,
> fade: 250,
> bodyHandler: function() {
> var content = $(this).attr("state");
> console.log(content);
> return $(&quo
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.
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
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
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
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
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
>
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'
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
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?
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
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
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()
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
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
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?
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
$(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
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
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.
25 matches
Mail list logo