This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//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; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!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> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//The POINTS | |
window.jQuery = window.$ = jQuery | |
using CSS selector or jQuery helper or jQuery method // $('li:first-child') vs. $('li':first) || $('li').first() | |
this refferring the regular DOM node | |
$(this) jQuery wrapped // jQuery methods can be used | |
use direct used JQ methods instead of refferred helper methods |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
http://api.jquery.com/category/selectors/ | |
http://api.jquery.com/category/traversing/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(document).ready(function() { | |
// Support for AJAX loaded modal window. | |
// Focuses on first input textbox after it loads the window. | |
$('[data-toggle="modal"]').click(function(e) { | |
e.preventDefault(); | |
var href = $(this).attr('href'); | |
if (href.indexOf('#') == 0) { | |
$(href).modal('open'); | |
} else { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html> | |
<head> | |
<meta charset=utf-8> | |
<title>Effect Speeds / Custom Effect Methods</title> | |
<style> | |
p { margin-top: 0;} | |
</style> | |
</head> | |
<body> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$('.frdtPicker').datetimepicker({ | |
onClose: function(dateText, inst) { | |
var endDateTextBox = $('.todtPicker'); | |
if (endDateTextBox.val() != '') { | |
var testStartDate = new Date(dateText); | |
var testEndDate = new Date(endDateTextBox.val()); | |
if (testStartDate > testEndDate) { | |
var testStartDate = new Date(dateText).getTime() + 60000; | |
var testStartDate2 = new Date(testStartDate); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//http://stackoverflow.com/a/3113742/1472649 | |
str.replace(/([ #;&,.+*~\':"!^$[\]()=>|\/@])/g,'\\$1'); |
OlderNewer