user1934044
user1934044

Reputation: 516

jquery toggel in meteor

my code

<li id="dropdownToggle"> Points
         <ul  class="menudropdown">
              <li> Assign Points</li>
               <li>Points Issues</li>
          </ul>
  </li>

CSS

.menudropdown {
    display:none;
}

JS template helper

'click #dropdownToggle':function(event){
    $(event.currentTarget).next('.menudropdown').toggle();
}

Looks like the problem is with js code, what is the issue here?

Upvotes: 0

Views: 45

Answers (1)

Jarvis Stark
Jarvis Stark

Reputation: 611

You can use the following code:

    $(event.currentTarget).find('.menudropdown').toggle();

This is the JSFiddle: CLICK HERE

Upvotes: 1

Related Questions