Last active
August 29, 2015 14:10
-
-
Save marcelloinfoweb/d6264cefb15ae9a3a626 to your computer and use it in GitHub Desktop.
Pop-Up Colorbox - Imagem com Link
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*jslint browser: true*/ | |
/*global $, jQuery, alert*/ | |
(function ($) { | |
"use strict"; | |
if (document.cookie.indexOf('visited=true') === -1) { | |
var umaHora = 1000 * 60 * 60, | |
expires = new Date((new Date()).valueOf() + umaHora); | |
document.cookie = "visited=true;expires=" + expires.toUTCString(); | |
$.fn.colorbox({ | |
html: "<a href='URL-LINK' target='_blank' ><img width='900' height='550' src='LINK-IMAGEM'/></a>", | |
open: true, | |
retinaImage: true, | |
opacity: 1, | |
height: 535, | |
width: 910 | |
}); | |
} | |
}(jQuery)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment