[jQuery] Re: simple beginner question

2009-06-18 Thread jlcox
Something like this: $(.logo).hover(function(){ $(this).children(.caption).animate({opacity:show}, fast); }, function(){ $(this).children(.caption).animate({opacity:hide}, slow); });

[jQuery] Re: simple beginner question

2009-06-18 Thread Charlie
you're each idea is right on track $(".logo").each(function(){ $(this).hover(function(){ /// *this* within an *each* will single out the individual .logo you hover over $(this).find(".caption").animate({opacity:"show"}, "fast");// look within this .logo only }, function(){

[jQuery] Re: jquery beginner question

2009-06-18 Thread ravi
On Jun 18, 2009, at 2:03 PM, mojoeJohn wrote: so how do i only act on one logo at a time without having to individually number each logo on the page? Use this. I am a newbie myself, so you will need to iterate over this modified version of your code to get it right: $(document).ready(

[jQuery] Re: jquery beginner question

2009-06-18 Thread mojoeJohn
thanks ravi. i appreciate the help! On Jun 18, 4:26 pm, ravi ravi-li...@g8o.net wrote: On Jun 18, 2009, at 2:03 PM, mojoeJohn wrote: so how do i only act on one logo at a time without having to individually number each logo on the page? Use this. I am a newbie myself, so you will need to

[jQuery] Re: jquery beginner question: defer $('x').text('change') until after $('x').animate()

2009-05-14 Thread illovich
I also tried $(function(){ $('.frame3').click(function(){ $('#story').animate({ opacity: 'hide'}, 'fast').css ('background-position' , '-0px -302px').animate({ opacity: 'show'}, 'fast');

[jQuery] Re: jquery beginner question: defer $('x').text('change') until after $('x').animate()

2009-05-14 Thread Nikola
You're going to want to use callbacks... $('#word1, #story').fadeOut('fast', function(){ $(#word 1).text (lorem); $(#word).text(ipsum); $('#word1, #story').fadeIn (slow)}); $('.frame3').click(function(){ $('#story, #word1').fadeOut('fast', function(){ $('#story').text (lorem);

[jQuery] Re: jquery beginner question: defer $('x').text('change') until after $('x').animate()

2009-05-14 Thread Nikola
Since you want to execute the text change and fadeIn after the animation completes you need to use a callback... $('.frame3').click(function(){ $('#story, #word1').fadeOut('fast', function(){ $('#story').text(lorem); $('#word1').text(ipsum); $('#story,

[jQuery] Re: A Beginner Question

2008-01-23 Thread Priest, James (NIH/NIEHS) [C]
-Original Message- From: Karl Swedberg [mailto:[EMAIL PROTECTED] You could use John Resig's .nextUntil() method. Karl - is that documented anywhere on the jQuery site - or any plans to incorporate that into the core? I saw a reference of that somewhere yesterday (maybe on your

[jQuery] Re: A Beginner Question

2008-01-23 Thread Karl Swedberg
Hey Jim, It was documented on the jQuery 1.2 roadmap, but it didn't make it into core for the 1.2 release (unlike nextAll(), wrapInner(), wrapAll(), etc.). Not sure why, but so it goes. http://docs.jquery.com/JQuery_1.2_Roadmap#.nextUntil.28.29_.2F_.prevUntil.28.29 The roadmap links to

[jQuery] Re: A Beginner Question

2008-01-22 Thread tlob
try to use IDs/classes in the DDs. just an Idea cheers tl On Jan 22, 6:37 pm, Volkan Görgülü [EMAIL PROTECTED] wrote: Hi, Lets say I have a Definition List like shown below. dl dta href=#Item Group A/a/dt ddItem 1/dd ddItem 2/dd dta href=#Item Group B/a/dt ddItem 1/dd ddItem 2/dd

[jQuery] Re: A Beginner Question

2008-01-22 Thread Priest, James (NIH/NIEHS) [C]
-Original Message- From: Volkan Görgülü [mailto:[EMAIL PROTECTED] What I want to achieve is whenever I click an a tag in dt I want to show dd tags inside the clicked dt Look at your code - you are saying when I click a DT do toggle... but you aren't defining which dt. So of

[jQuery] Re: A Beginner Question

2008-01-22 Thread Karl Swedberg
Hi Volkan, You could use John Resig's .nextUntil() method. Drop this in your js file somewhere... / next until / $.fn.nextUntil = function(expr) { var match = []; // We need to figure out which elements to push onto the array this.each(function(){ //

[jQuery] Re: A Beginner Question

2008-01-22 Thread Jörn Zaefferer
Karl Swedberg schrieb: Hi Volkan, You could use John Resig's .nextUntil() method. Not 100% sure, but afaik nextUntil is included in jQuery 1.2 as nextAll: http://docs.jquery.com/Traversing/nextAll Maybe someone can confirm that. Jörn

[jQuery] Re: A Beginner Question

2008-01-22 Thread Hamish Campbell
Here's how you do it (tested and working): !-- HTML -- dl dta href=No-Javascript-URL_AItem Group A/a/dt ddItem 1/dd ddItem 2/dd dta href=No-Javascript-URL_BItem Group B/a/dt ddItem 1/dd ddItem 2/dd ddItem 3/dd /dl script $(document).ready(function() {

[jQuery] Re: A Beginner Question

2008-01-22 Thread Volkan Görgülü
Thank you very much James, this makes sense, I am going to investigate it. Your help is very apreciated. Best Regards

[jQuery] Re: A Beginner Question

2008-01-22 Thread Cloudream
dl dta href=#Item Group A/a/dt ddItem 1/dd ddItem 2/dd /dl dl dta href=#Item Group B/a/dt ddItem 1/dd ddItem 2/dd ddItem 3/dd /dl script type=text/javascript $(document).ready(function(){ $(dt a).click(function(){$ (this).parent().parent().find(dd).toggle(); return false;}); }); /script

[jQuery] Re: A Beginner Question

2008-01-22 Thread Volkan Görgülü
Hi Karl, Thanks for your great help. It worked. Best Regards

[jQuery] Re: A Beginner Question

2008-01-22 Thread Hamish Campbell
nextAll behaves differently from nextUntil On Jan 23, 12:34 pm, Jörn Zaefferer [EMAIL PROTECTED] wrote: Karl Swedberg schrieb: Hi Volkan, You could use John Resig's .nextUntil() method. Not 100% sure, but afaik nextUntil is included in jQuery 1.2 as

[jQuery] Re: 2 beginner question

2007-07-10 Thread tlob
cheers! I'm such a beginner. http://i.somethingawful.com/cliff/ihateyou/page-262/3.jpg On 10 Jul., 15:55, John Resig [EMAIL PROTECTED] wrote: You have to add an extra wrapper function in .ready(), like so: $(document).ready(function(){ // your code }); On 7/10/07, tlob [EMAIL

[jQuery] Re: 2 beginner question

2007-07-10 Thread John Resig
You have to add an extra wrapper function in .ready(), like so: $(document).ready(function(){ // your code }); On 7/10/07, tlob [EMAIL PROTECTED] wrote: Hello First very simple question: why ist this not allowed? [code] $(document).ready( var isplaying = false; //something else );

[jQuery] Re: 2 beginner question

2007-07-10 Thread Jake McGraw
Answer both of your questions: Use: $(document).ready(function() { /* ... */ }); Not: $(document).ready( /* ... */ ); - jake On 7/10/07, tlob [EMAIL PROTECTED] wrote: Hello First very simple question: why ist this not allowed? [code] $(document).ready( var isplaying = false; //something