[jQuery] Re: generic jquery tip
assign each .tip div with an id. then when you set the cookie, use the id to make it individual. something like: $jQ(document).ready(function() { //Probably will want to put this in a foreach loop of IDs var tip = $jQ.cookie('tip_ID'); if(tip == 'yes') { $jQ("#ID").hide(); }else { $jQ('#ID').css('display', 'block'); $jQ('#ID').fadeIn('slow'); $jQ('.close').click(function() { $jQ('.tip').fadeOut('slow'); //use parent to find div id, i cant think of it now $jQ.cookie('tip_ID','yes'); }); } //End foreach }); replace id with the actual id. a better way would to be to make the cookie an array of ids On May 19, 1:39 pm, ocptime wrote: > Hi, > In my application I have many tips ( which are divs ) for eg: a tip > explaining what are recurring invoices, items etc. Each of these tips > has a close button, when closed will set a cookie with value "true". > tip1 cookie value =1 which then will dismiss this tip. So the next > time a page is loaded, the tip will not be show. > > Now the issue is i have many tips, so what i am using now is: > > $jQ(document).ready(function() { > var tip = $jQ.cookie('tip'); > > if(tip == 'yes') { > $jQ(".tip").hide(); > }else { > $jQ('.tip').css('display', 'block'); > $jQ('.tip').fadeIn('slow'); > $jQ('.close').click(function() { > $jQ('.tip').fadeOut('slow'); > $jQ.cookie('tip','yes'); > }); > } > > }); > > so it will close all tips if the value is true. How can i make it set > for each tip, ie; make it generic? > > Any help appreciated. > > Thanks in advance, > ocptime
[jQuery] slide toggle image hides
Hi guys, I've created the slide toggle on one of our websites http://www.pukkaup.com/team/ But if you look at the page in IE, the images disappear. Does anyone know why? It doesn't happen for me in FF. Thanks
[jQuery] Re: slideUp and slideDown works only once
Thanks for the help but i solved it without a plugin, using slideToggle. It's still a bit jumpy but: $('.open').slideToggle('slow', function() { $(this).removeClass ('open'); }); $('.'+$(this).attr("id")).slideToggle('slow', function() { $ (this).addClass('open'); }); On Apr 25, 1:34 pm, Jeff Jones wrote: > I'm not sure what your ultimate goal is, but you might try the cycle > plugin. It has a lot of flexibility.http://plugins.jquery.com/project/cycle > > On Apr 24, 8:07 pm, adw999 wrote: > > > I tried using slideToggle but the screen flickers badly, any reasons > > for this? > > > Thanks > > > On Apr 25, 12:53 am, amuhlou wrote: > > > > The function you are calling calls slideUp for the first div and > > > slideDown for the 2nd item. When you click it a 2nd time it won't > > > work because the divs are already in the positions they should be > > > (having already been slid up and down). > > > > I think you may have better luck with the slideToggle method, which > > > toggles the visibility of the elements. > > > >http://docs.jquery.com/Effects/slideToggle > > > > On Apr 24, 7:00 pm, adw999 wrote: > > > > > Hi, > > > > > I have the following code: > > > > > $(document).ready(function() { > > > > $('.artistspanel').hide(); > > > > $("#teamcontainer h2").click(function(){ > > > > $('#teamcontainer > > > > div:visible').not('.hr').slideUp('slow'); > > > > $('.'+$(this).attr("id")).slideDown('slow').show(); > > > > }); > > > > > }); > > > > > Which runs with the html: > > > > > > > > > > Panel 1 > > > > > > > > //content > > > > > > > > > > > > Panel 2 > > > > > > > > //content > > > > > > > > > > > > Panel 3 > > > > > > > > //content > > > > > > > > > > > > > > It runs the slide up and slide down fine one round, but clicking the > > > > h2 again doesn't do anything. Any suggestions?
[jQuery] Re: slideUp and slideDown works only once
I tried using slideToggle but the screen flickers badly, any reasons for this? Thanks On Apr 25, 12:53 am, amuhlou wrote: > The function you are calling calls slideUp for the first div and > slideDown for the 2nd item. When you click it a 2nd time it won't > work because the divs are already in the positions they should be > (having already been slid up and down). > > I think you may have better luck with the slideToggle method, which > toggles the visibility of the elements. > > http://docs.jquery.com/Effects/slideToggle > > On Apr 24, 7:00 pm, adw999 wrote: > > > Hi, > > > I have the following code: > > > $(document).ready(function() { > > $('.artistspanel').hide(); > > $("#teamcontainer h2").click(function(){ > > $('#teamcontainer div:visible').not('.hr').slideUp('slow'); > > $('.'+$(this).attr("id")).slideDown('slow').show(); > > }); > > > }); > > > Which runs with the html: > > > > > > Panel 1 > > > > //content > > > > > > Panel 2 > > > > //content > > > > > > Panel 3 > > > > //content > > > > > > > > It runs the slide up and slide down fine one round, but clicking the > > h2 again doesn't do anything. Any suggestions?
[jQuery] slideUp and slideDown works only once
Hi, I have the following code: $(document).ready(function() { $('.artistspanel').hide(); $("#teamcontainer h2").click(function(){ $('#teamcontainer div:visible').not('.hr').slideUp('slow'); $('.'+$(this).attr("id")).slideDown('slow').show(); }); }); Which runs with the html: Panel 1 //content Panel 2 //content Panel 3 //content It runs the slide up and slide down fine one round, but clicking the h2 again doesn't do anything. Any suggestions?
[jQuery] iTunes like scroller
Hi Does anyone know of a plugin that mimics the album cover view in iTunes? Like http://en.wikipedia.org/wiki/Cover_Flow Thanks
[jQuery] iTunes like scroller
Hi Does anyone know of a plugin that mimics the album cover view in iTunes? Like http://en.wikipedia.org/wiki/Cover_Flow Thanks