orbit4-5/app/assets/javascripts/frontend.js

16 lines
544 B
JavaScript
Raw Normal View History

2014-11-13 08:29:38 +00:00
(function($) {
2014-12-31 07:16:24 +00:00
$("document").ready(function(){
2014-11-13 08:29:38 +00:00
// Get link data-attribute and make the banner clickable
2014-12-31 07:16:24 +00:00
$('.w-ad-banner__slide')
.not('[data-link=""]')
.not(".youtube")
.addClass('cursor')
.on("click",function(){
if( $(this).data('target') === '_blank' ) {
window.open($(this).data("link"), "_blank");
} else {
window.location.href = ($(this).data("link"));
}
2014-11-13 08:29:38 +00:00
})
})
}(jQuery));