Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <script type="text/javascript">
- $(function() {
- if (localStorage) { //if local storage
- if (!localStorage.getItem('visited')) { // if not site is visited before
- $('#slickbox').show(); //show element
- }
- } else { //if not local storage use cookies or just show element in old browsers
- $('#slickbox').show();
- }
- // shows the slickbox on clicking the noted link
- $('#slick-show').click(function() {
- $('#slickbox').show('slow');
- return false;
- });
- // hides the slickbox on clicking the noted link
- $('#slick-hide').click(function() {
- $('#slickbox').slideUp('fast');
- localStorage.setItem('visited', true); //set flag, site now visited and element hidden
- $('a#logo').tipsy('show');
- return false; });
- // toggles the slickbox on clicking the noted link
- $('#slick-toggle').click(function() {
- $('#slickbox').toggle(400);
- return false;
- });
- });
- </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement