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

Reply via email to