0
假設我有以下標記如何找出在sammyjs中發起事件的元素?
<ul class="app-nav">
<li><a href="#!/testing">Link to testing route</a>
</ul>
...
<a href="#!/testing">Other link to testing route</a>
使用jQuery
$('a').click(function() {
console.log($(this)); //the event sender and can be 'a' or 'ul>li>a'
});
隨着sammy.js
this.get('#!/testing', function(context) {
//how I can get the event sender?
});