Giter VIP home page Giter VIP logo

lab's Introduction

Various coding experiments and demos

These fun CSS3 & HTML5 experiments were created in my free time in order to practice and improve my coding skills. You might encounter some bugs, as some of the technology used is not yet adopted by all browsers. Best viewed in Google Chrome.

Main website: https://alexcican.com

lab's People

Contributors

alexcican avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

lab's Issues

Uncaught TypeError: $.cookie is not a function

Hi.
I am trying to use your plugin, but it gives me this error: "Uncaught TypeError: $.cookie is not a function"

I have imported the plugin as such:

"< script src="http://lab.alexcican.com/set_cookies/cookie.js" type="text/javascript" ></script>
< script type="text/javascript" >
$(document).ready(function() {

// if the cookie is true, hide the initial message and show the other one
if ($.cookie('hide-after-click') == 'yes') {
$('.change-message--on-click').removeClass('hide--second');
$('.change-message--on-click').addClass('hide--first');
}

// add cookie to hide the first message after load (on refresh it will be hidden)
$.cookie('hide-after-load', 'yes', {expires: 7 });

// when clicked on “X” icon do something
$('.close').click(function() {
// check that “X” icon was not cliked before (hidden)
if (!$('.change-message--on-click').is('hide--first')) {
$('.change-message--on-click').removeClass('hide--second');
$('.change-message--on-click').addClass('hide--first');

  // add cookie setting that user has clicked
  $.cookie('hide-after-click', 'yes', {expires: 7 });
}
return false;

})
});
</script >"

Where am I doing wrong?
Thanks.

Not working with 100% height

Hi there, trying to use this plugin and I couldn't seem to get it to work, then realised that it's because the body and html tags have 100% on them, which is necessary for my site but messes up the scroll position detection part of this. Would you have any ideas for how to get around this?

Nav bar hiding after a certain point

Hi, I was wondering if there's a way to get the nav bar hiding after a certain amount of scroll instead of hiding it as soon as the user scrolls down. I cant really get my head around doing this.

Thanks for the awesome work btw

Bugs - fade effect and firefox issues

Hey Alex,

I have recently tried to install the Teehan+Lax Navigation on my website using your tutorial (http://lab.alexcican.com/teehan_lax_navigation/).
Thanks for sharing, great tutorial. Most of it seems to work, but I’ve come across a few small but annoying bugs.

First of all, when you scroll down on a page and open the menu and then try to close it, the fade effect is removed,
whilst if you would’ve done this at the top of the page; the fade effect would be there.

Another bug that I have found in my code is that if you open (or try to) in Firefox, it works fine at first glance but as soon as the menu is open it fills entirely with white.
You can even see the menu working fine below it before the white fills the entire menu.

Would you be able to take a look at my demo website and try to fix these bugs with me? I would really appreciate that.

http://brandcube.nl/beta/

Cheers!
Job Keupink

Close div

Shouldn't line 23 of index.html in the teehan+lax menu be </div>?

It works only for a single page - problem

Hi, I'm using your code but I have an issue. I'm using the code in a wordpress website. The code work fine but only in a single post. I mean if a user visit a specific post and than visit that post again, the cookie works fine. But if the user visit another post, the cookie doesn't work anymore.

This is the code I use:

<script src="http://code.jquery.com/jquery-latest.js"></script> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js"></script> <script type="text/javascript" src="cookie.js"></script> <script type="text/JavaScript">

$().ready(function() { if ($.cookie('hide-after-load') == 'yes') { $("#popup").hide(); } $.cookie('hide-after-load', 'yes', {expires: 7 }); }); </script>

Can you please help me?

Thank you!
G.

Cahnge NAV to an ID

Hi

Great work you have done here by the way 😀👍

Perhaps we should change the nav element in the js to a dedicated ID selector? Using nav as a reference in the javascript highjacks all nav elements on the site so that it is impossible to use elsewhere.

How to make the div hide always on window load

I must say this is one of the best cookie js plugin and I am loving this. But I have an issue.

As the browser check the cookie (say myCookie) at first and then do actin like remove class, the problem is that the the div becomes visible for a split of a second and hides. This is actually not good for a UX.

I would like it to hide or remove forever (or least not visible on page load at all) when the close button is clicked. Is it possible?

Many thanks

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.