thanks that woked!

i am getting very confused as i have no prior experience with
javascript either.

Can you please see If im going in right direction with this?

I am just trying to take this plugin
http://www.i-marco.nl/weblog/jquery-accordion-menu/
and integrate cookies to it so once user hits refresh his settings
stay in place

this is what I have so far.

    function initMenu() {
  $('#menu ul').hide();
  $('#menu li a').click(
    function() {
    $(this).filter(".a").click(function(){setCookie($(this));});
    alert('this isname: ' + $(this).attr('name'));

        $(this).next().slideToggle('normal');

      }
    );
  }
  function setCookie(ob)
  {
    $.cookie('the_cookie', 'the_value');
    alert('cookie set  ' + $ob.attr('name'));
  }
  $(document).ready(function() {initMenu();});

but in my setCookie method I'm not able to get the value of the
attribute...

On Jan 28, 5:09 pm, "Matt Quackenbush" <[EMAIL PROTECTED]> wrote:
> $(this).attr('name');
>
> I think that's what you're looking for?

Reply via email to