[jQuery] Sortable callback?

2009-02-02 Thread chriscoyier
Hello! So I have a simple sortable list with jQuery UI's .Sortable() function. I am hoping to have it fire off a function right after any of the list items are moved. From the documentation, "update" seems to be the paramater to pass it to get it to do that: $(".list").sortable({ handle

[jQuery] Re: Smarter way to write this repetitive code?

2008-12-20 Thread chriscoyier
Perfect! Thanks Ryura =) On Dec 20, 7:21 pm, Ryura wrote: > $('.headline').each(function(i) { >         $(this).click(function() { >                 $('.article-text:eq('+i+')').fadeIn(); >         }) > > })

[jQuery] Smarter way to write this repetitive code?

2008-12-20 Thread chriscoyier
$('.headline:eq(0)').click(function() { $('.article-text:eq(0)').fadeIn(); }); $('.headline:eq(1)').click(function() { $('.article-text:eq(1)').fadeIn(); }); $('.headline:eq(2)').click(function() { $('.articl

[jQuery] Re: $(this).select(); is funky in Safari?

2008-09-13 Thread chriscoyier
I do want the text to remain in the field when users enter it. The users specifically enter it in their account as a default. If I use the click event instead of focus, it does work. I just would rather use the focus event since it would cover someone "tabbing" into that textarea instead (fairly

[jQuery] $(this).select(); is funky in Safari?

2008-09-13 Thread chriscoyier
My goal is to have a text area that has text content in it already, but when you click into it the text highlights so you can easily replace it. $("textarea").focus(function(){ $(this).select(); }); Works great in Firefox (3), but in Safari (dev 4), the text hightlights quick and then un-highlig