Question: I have a dropdown menu that slides up and down when toggled to reveal it's menu items. The problem is that when i go to click one of the menu items after the menu has slid down, it is recognized as a toggle and the menu slides up without opening the link of the menu item.

HTML

```
<li class="dropdown">
            <a href="#">Carbohydrates, proteins &amp; fats</a>
            <ul>
                <li><a href="carbohydrates.php">Carbohydrates</a></li>
                <li><a href="proteins.php">Proteins</a></li>
                <li><a href="fats.php">Fats</a></li>
            </ul>
        </li>

```

dropdown script:

```
$(document).ready(function () {
    $('.dropdown').toggle(
        function () {
            //show its submenu
            $('ul', this).slideDown(300);
        },
        function () {
            //hide its submenu
            $('ul', this).slideUp(300);        
        }
    );

});

```

I'd appreciate any help with this.

Answer: 
`UIGestureRecognizer` has a property `view` which is the view the gesture recognizer is attached to.

Therefore, in your handler method, `gestureRecognizer.view` is the button that the LPGR is attached to and `gestureRecognizer.view.tag` is the button's tag.

**ADDED:** 
Sample code:

```
- (void)longPressHandler:(UILongPressGestureRecognizer *)gestureRecognizer {
    NSLog(@"longPressHandler");
    NSInteger tag = gestureRecognizer.view.tag;
    NSLog(@"%d longPressHandler",tag);
}

```
You can simply create a subclass of `UILongPressGestureRecognizer` and add a `tag` property to it. You could also use [associated objects](http://developer.apple.com/library/ios/#documentation/cocoa/conceptual/objectivec/Chapters/ocAssociativeReferences.html) to add the property with a category.