Skip to content

Instantly share code, notes, and snippets.

@lucemia
Created July 27, 2015 02:17
Show Gist options
  • Save lucemia/45872706b019d32a88da to your computer and use it in GitHub Desktop.
Save lucemia/45872706b019d32a88da to your computer and use it in GitHub Desktop.
$('.link').on({
click: function(e) {
e.stopPropagation();
var id = $(this).parents('.item')[0].id;
id = parseInt(id.replace('item-', ''));
Ad.click(data[id]['url']);
}
});
$('.item').on({
mouseover: function(e) {
var id = parseInt(this.id.replace('item-', ''));
Ad.statemachine.Highlight(id)
},
mouseout: function(e) {
if (Ad.statemachine.current == 'Highlight')
Ad.statemachine.Slideshow();
}
});
$('.item').hoverIntent({
interval: 300,
over: function(e) {
var id = parseInt(this.id.replace('item-', ''));
Ad.statemachine.Detail(id);
},
out: function(e) {
Ad.statemachine.Slideshow();
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment