Welcome To Snipplr
Everyone's Recent jQuery Snippets Tagged javascript
- All /
- JavaScript /
- HTML /
- PHP /
- CSS /
- Ruby /
- Objective C
This is essentially how to detect an outside click for a dialog box on a website, using HTML/CSS/Javascript/JQuery.
Essentially you need to understand event propagation how it works throughout the DOM with JQuery, to make this as simple as possib...
0
997
posted 14 years ago by alvincrespo
This is some very basic jQuery to post from a comment form on a website. I would probably change the .click to .bind("click",) and for different sites I add a success message. This code works with a basic form with text inputs named #name and #email...
3
1132
posted 14 years ago by creativeboulder
Hello,
I have been developing with jQuery for just over a year now, I thought I would share something with you that I have found pretty time saving over the past few months.
If you have ever had javascript conflicts due to several different jav...
2
960
posted 14 years ago by mike-tempest
This is a cut down example using custom tabs (you can easily add a custom ajax event to load in content - just follow Ben Alman's example).
0
1334
posted 14 years ago by Meander365
More info on SO: http://stackoverflow.com/questions/4061489/jquery-duplicate-field-input-text-in-real-time
1
1256
posted 14 years ago by logic-unit
A jQuery plugin that adds the .spiral() method, wich moves an element along an archimedean spiral path.
3
1834
posted 14 years ago by claudiowebdesign
This snippet of code is probably the most common and _valuable_ in the world of jQuery.
1
1151
posted 14 years ago by creativeboulder
This is a very useful piece of code (html, css, jquery) to have a nice animated floating menu on your page. I totally love it.
I used it with jquery 1.3.2 and up
3
1073
posted 14 years ago by e11world
<p>This snippet could be used when a text input has a default value. Thus, when user clicks on the input to write, the default value disappears and allows the user to write, but if the user does not type anything, the default value will appears again...
1
1061
posted 14 years ago by andres_314
This is quick code that demonstrates the usage of Microsoft's jQuery templating plugin.
8
1376
posted 14 years ago by Nettuts
Also includes the fix for when the user resizes the window.
4
1059
posted 14 years ago by Meander365
Handy. Hide an element as soon as possible, before document.ready. The element gets hidden but only when a class is applied to the html via js.
1
1009
posted 14 years ago by Meander365
I can see this being useful for when you want to pass a lot of associated data to an event handler from elements and their chosen trigger action.
1
1133
posted 14 years ago by Meander365
For those multiple rollovers - and their multiple flashes! The solution is to stop(!) them.
2
981
posted 14 years ago by Meander365
Dave Metvin\'s method. Two tricks to the method:\r\n\r\n$($boxes[div++] || []) - increaments \"div\" and passes an empty array if the element doesnt exist (so it exists).\r\n\r\narguments.callee - the name of the function currently being executed.
1
979
posted 14 years ago by Meander365
I’ve seen some very cool parallax effect around lately, especially liking the Silverback site. But none of them are particularly interactive, so I thought I’d make a small implementation of the Parallax effect that interacts with the mouse.
Ve...
1
924
posted 14 years ago by dom111
A simple script that will add captions to images and allow for easy styling.
1
866
posted 14 years ago by dom111
So recently I was asked to change a navigation style of an existing site to drop-down menus.
Simple, I thought, just use one of the many existing drop-down plugins. I tried many, but most seemed to use hardcoded styles and I had a few problems (so...
0
1069
posted 14 years ago by dom111