Suppose you have this HTML:

```
<button class="btn btn-default dropdown-toggle" data-toggle="dropdown" type="button" aria-expanded="true">
        <span class="visible-sm-inline visible-md-inline visible-lg-inline">Sort by</span>
        <span class="visible-xs-inline"><i class="fa fa-fw fa-sort"></i></span>
        <span class="caret"></span>
    </button>
<ul class="dropdown-menu pull-right">
        <li><a href="#" class="newest_to_oldest" data-sort="newest_to_oldest"><i class="fa fa-fw"></i> Newest to Oldest</a></li>
        <li><a href="#" class="oldest_to_newest" data-sort="oldest_to_newest"><i class="fa fa-fw"></i> Oldest to Newest</a></li>
        <li><a href="#" class="most_posts" data-sort="most_posts"><i class="fa fa-fw"></i> Most posts</a></li>
        <li><a href="#" class="zero" data-sort="zero"><i class="fa fa-fw"></i> Post senza risposta</a></li>
    <li><a href="#" class="most_views" data-sort="most_views"><i class="fa fa-fw fa-check"></i> Most Views</a></li></ul>

```

I need to detect when I click on other tag except:

```
<a href="#" class="most_views" data-sort="most_views"><i class="fa fa-fw fa-check"></i> Most Views</a></li></ul>

```

I tried this in jQuery:

```
    $('a[data-sort!="most_views"]').click(function(){
console.log("HI");
    });

```

Is there anyone who can help me?