samuel-philipp.de/js/app.js

21 lines
560 B
JavaScript
Raw Normal View History

2016-10-28 17:05:19 +00:00
// $(document).ready(function () {
// $(document).foundation();
// });
$(function () {
$('#maximage').maximage();
$('#maximage').children().on('click', function(){
// Retrive our URL (set in data-href attribute on img tags)
var url = $(this).data('href');
// If our URL is set, open a new window with that URL
// You can certainly use window.location here too
if(url.length > 0){
window.open(
url, // <- This is what we set with the data-href attribute
'_blank' // <- This is what makes it open in a new window.
);
}
});
});