Posts tagged as ' jQuery ' ...

24 Nov 2009 @ 1:27 AM 

Hello this post is the one of the things i have stumbled upon today

I was working on a project and i was requested to do something ala Gmail shortcuts, aka you press a specific button and something happens, well, first off i looked on the web to see if there is any information, which of course it’s not at least from what i looked so i had to build it myself

First off we’ll start with a basic XHTML, containing an un-ordered list, styled a bit, the real secret is the JS itself, you can style the xhtml/css as you want, it doesnt really matter. To save space i’ll upload the complete final files at the end of this post, with instructions and comented css/xhtml/jquery

+ Continue Reading This Article

Tags

Tags: , ,

Categories: jQuery, XHTML/CSS

Posted By: Dinulescu Alexandru Adrian

Last Edit: 08 Jan 2010 @ 08:55 PM

EmailPermalinkComments (1)

22 Nov 2009 @ 7:38 PM 

Hello

Did you knew that Google Chrome does not understand keypress() on special keys like arrow keys/esc/enter/etc ?

Me neither

I was trying to get the following code to work and it didnt work in Google Chrome at all

    $(window).keypress(function(e){
        var code = (e.keyCode ? e.keyCode : e.which);
        if (code == 32 || (65 < = code && code <= 65 + 25) || (97 <= code && code <= 97 + 25)) {
           alert("haxxor");
        }
  $(window).keypress(function(el){
        var alphaCode = (el.keyCode ? el.keyCode : el.which);
        if (alphaCode == 37) {
            alert("left key");
        }
        if (alphaCode == 39) {
             alert("right key")
        }

        if ( alphaCode == 13) {
            alert ("enter key")
        }
        if ( alphaCode == 27) {
            alert ("escape key")
        }      
    });

+ Continue Reading This Article

Tags

Tags: , ,

Categories: jQuery

Posted By: Dinulescu Alexandru Adrian

Last Edit: 08 Jan 2010 @ 08:43 PM

EmailPermalinkComments (0)

19 Nov 2009 @ 4:52 PM 

Hello

This is a post about the 3 properties in javascript, keypress, keyup and keydown. There are some small differences in the means to extract the data of the pressed key.

First off to explain the 3 properties:

  • keypress – this is both a keyup and keydown, it triggers when the key is pressed
  • keyup – this triggers when you lift your finger from a key
  • keydown -> this triggers when you drop your finger on a key

+ Continue Reading This Article

Tags

Tags:

Categories: jQuery

Posted By: Dinulescu Alexandru Adrian

Last Edit: 08 Jan 2010 @ 08:39 PM

EmailPermalinkComments (0)

14 Nov 2009 @ 3:34 AM 

Hello

I just found out something very very interesting when i was working on a project. Basically it required me to put a div inside a a tag and that div also had some links. I managed to do that however the code is not valid. Will post source code with examples and explanations tomorrow.

Okay so basically what I was trying to create was something like this (simplified for good reasons)

My version also had a hover JS element over the entire box, so when the user hovers over it, it gets highlighted. So far nothing went bad, everything fits together nicely

<div class="box">
      <img src="./image/stuff.png" alt="" height="200px" width="200px" />
      <p> <a href="#"> Link 1 </a> <a href="#"> Link 2 </a> </p>
</div>

+ Continue Reading This Article

Tags

Tags: , ,

Categories: jQuery, XHTML/CSS

Posted By: Dinulescu Alexandru Adrian

Last Edit: 08 Jan 2010 @ 08:34 PM

EmailPermalinkComments (1)

13 Apr 2009 @ 2:24 AM 

Hello

I was always wondering what jQuery can do to help me give more power to my CSS stylesheets so one day after some time spent on the web i discovered a very very simple solution that was so easy to install that i was baffled that i couldnt figure it out a lot sooner. So without further comments here is the rundown of the stuff.

+ Continue Reading This Article

Tags

Tags: , , ,

Categories: jQuery, XHTML/CSS

Posted By: Dinulescu Alexandru Adrian

Last Edit: 07 Jan 2010 @ 08:19 PM

EmailPermalinkComments (0)