help designer's to push code

This commit is contained in:
JiangRu 2014-12-31 15:16:24 +08:00
parent 4425063a68
commit 487d84c1d1
1 changed files with 11 additions and 3 deletions

View File

@ -1,8 +1,16 @@
(function($) {
$("document").ready(function(){
$("document").ready(function(){
// Get link data-attribute and make the banner clickable
$('.w-ad-banner__slide').not('[data-link=""]').not(".youtube").addClass('cursor').on("click",function(){
window.open($(this).data("link"),"_blank");
$('.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"));
}
})
})
}(jQuery));