I am using wallpress and jigoshop and my index page is shop. how can i set all the links target blank to open links in a new window in my index page?
3 Answers
For all links in index page (shop page) have target is blank, please replace the code I provided above with this new one:
<script>
jQuery(function($){
$('body.page-shop .item-actions .button').bind('click',function(e){
e.preventDefault(); window.open( $(this).attr('href'),'_blank');
return false;
});
$('body.page-shop a').attr('target','_blank');
});
</script>
Hello Kate,
To resolve this issue you can go to Dashboard / Appearance / Customize /Custom Code, and add this code below to Footer Code section:
<script>
jQuery(function($){
$('.item-actions .button').bind('click',function(e){
e.preventDefault(); window.open( $(this).attr('href'),'_blank');
return false;
});
$('a').attr('target','_blank');
});
</script>
Hope this helps!
Many Many Thanks.
No using this code all the links are target blank, I just want to use the index page (which is my shop) links as a target blank. shop products, shop cetagories, main menu on the index page…
Yes, the second code is working.
Please login or Register to submit your answer
replied 11 years ago
something like portfolio or showcase radio button or other way of slider