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
input:checkbox[name="testcases[]"]:checked | |
//less specific | |
$('[type="checkbox"]:checked'); | |
//another way | |
$('input:checkbox:checked.className'); | |
if(checkedTestcases.length<1){ | |
//at least one checked |
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
<?php | |
//if(isset($_POST['text']) && !empty($_POST['text'])) | |
//$text = $_POST['text']; | |
//$text = array("text" => $text); | |
$text = json_decode(file_get_contents('php://input')); | |
//$text -> text .= " said user!"; | |
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://jquerybyexample.blogspot.com/2011/08/mostly-asked-jquery-interview-questions.html |
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'); |
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
<!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
$(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
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
//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 |
NewerOlder