Welcome To Snipplr
Everyone's Recent JavaScript Snippets
- All /
- JavaScript /
- HTML /
- PHP /
- CSS /
- Ruby /
- Objective C
This is a JavaScript powered dropdown (flyout) menu. HTML and CSS included.
        
        
        
            0 
        
        
            1350 
        
                    posted 14 years ago by zvineyard
            This bit of jquery will take whatever you give it in the selector (which should be a valid jquery selector of any kind) and add or remove additional classas as appropriate based on width. 
The width and style names are all determined by the last i...
        
        
        
            0 
        
        
            2343 
        
                    posted 14 years ago by FatFolderDesigner
            This will get the arguments on the query string and put them into a handy array.
        
        
        
            0 
        
        
            1474 
        
                    posted 14 years ago by brownrl
            Developing a form where I had several date and time fields, I came with a jQuery multiselector where I need to get, through the name attribute, if it was a date or time field. So far, jQuery does not have a boolean method to check if an attribute of...
        
        
        
            0 
        
        
            1337 
        
                    posted 14 years ago by betacar
            Will produce output like this:
<html>
	...
</html>
<html>
	...
</html>
Target in CSS like this:
html[data-useragent*='Chrome/13.0'] .nav {background:url(img/radial_grad.png) center bottom no-repeat;}
or
html[data-useragent*=...
        
        
        
            0 
        
        
            2515 
        
                    posted 14 years ago by reverend
            Use this to convert JavaScript numbers to official scientific standard form (e.g. 1.54 × 10^3)
Uses HTML <sup> tags and × symbol
Example:
var number = 4.223e20;
var stnd = standardForm(number);
// stnd = 4.223 x 10^20
        
        
        
            0 
        
        
            1218 
        
                    posted 14 years ago by Jellybean732
            Why do this?
===========
*hopefully* this will cause the page to refresh and provide a stop button in the future. The idea is to use it while developing in a text editor, as in Vim or its ilk, and not have to alt+tab all the _*flipping*_ time.
F...
        
        
        
            0 
        
        
            1115 
        
                    posted 14 years ago by inreflection7
            found the solution here: http://stackoverflow.com/questions/2790001/fixing-javascript-array-functions-in-internet-explorer-indexof-foreach-etc
        
        
        
            0 
        
        
            1021 
        
                    posted 14 years ago by pixelatorz
            Simple recursive function to find objects that match the value of str hanging anywhere off the global JS object (window).
        
        
        
            0 
        
        
            1284 
        
                    posted 14 years ago by richt
            Pass variables into javascript files using query strings, and return them using getJSvars()
Example
//HTML
<script>
//return the value of "foo"
getJSvars('filename.js', 'foo');
        
        
        
            0 
        
        
            1364 
        
                    posted 14 years ago by DenoteIt
            Thanks to http://www.mredkj.com/javascript/numberFormat.html#addcommas
        
        
        
            0 
        
        
            1175 
        
                    posted 14 years ago by fengelz
            
