Skip to content

Instantly share code, notes, and snippets.

@sahinsf
sahinsf / 1.html
Created June 13, 2012 17:34
jQuery 30 - Basics
<!DOCTYPE html>
<html>
<head>
<meta charset='UTF-8'>
<title>HTML Document</title>
<style type="text/css">
ul li{color: red;}
.emphasis{color: green;}
</style>
</head>
@sahinsf
sahinsf / gist:2853220
Created June 1, 2012 16:06
cross Browser
Select Element:
There are no events on the option element in IE.
The change event on select is the only cross-browser-compatible way to be informed of a change of option.
Note that keyboard navigation may also fire this event.
@sahinsf
sahinsf / gist:2783271
Created May 24, 2012 18:20
checboxes
//just add a class for files only and apply how many selected
var notchecked = $('input'+topLevelClass(splittedClassNames)+':not(:checked)').length;
var checked = $('input'+topLevelClass(splittedClassNames)+':checked').length;
var all = $('input'+topLevelClass(splittedClassNames)).length;