Skip to content

Instantly share code, notes, and snippets.

@andyf-7
andyf-7 / Automatic room light controller with visitor counter
Created May 8, 2015 16:51
Automatic room light controller with visitor counter
http://www.mediafire.com/download/q4m651ut5n555u4/Assainmnet_final.zip
@andyf-7
andyf-7 / A to Z character print
Created May 3, 2015 11:09
A to Z character print example: a b c d...... Z
var first = "a", last = "z";
for(var i = first.charCodeAt(0); i <= last.charCodeAt(0); i++) {
document.write( eval("String.fromCharCode(" + i + ")") + " " );
}
@andyf-7
andyf-7 / check box checked
Created May 3, 2015 11:08
jquery check box checked
if($(".clschekbox").is(':checked')!=true)
{
alert("Please Select Checkbox");
}
else
{
var clientid =[];
$('input[name="clientid[]"]').each(function () {
if($(this).is(':checked')==true) {
clientid.push(this.value);
@andyf-7
andyf-7 / Div move left or right
Created May 3, 2015 11:06
jquery div move left or right
if(e=="moveleft")
{
var $current = $('#tsi'+shhetid).closest('li');
var $previous = $current.prev('li');
if($previous.length !== 0)
{
$current.insertBefore($previous);
}
return false;
}
@andyf-7
andyf-7 / mouse click then this possition div show
Created May 3, 2015 11:04
mouse click then this position div show on jquery
$(document).on("click",".footer-container ul li span a",function(e){
$('#viewfooterdoplist').css( 'position', 'absolute' );
$('#viewfooterdoplist').css( 'top', e.pageY );
$('#viewfooterdoplist').css( 'left', e.pageX );
})
@andyf-7
andyf-7 / Jquery array push
Created May 3, 2015 11:02
Jquery array push
var GradeName=[];
$('input[name="GradeName[]"]').each(function(){
GradeName.push(this.value);
});
@andyf-7
andyf-7 / Jquery responsive window check
Created May 3, 2015 11:00
Client side window onresize for resposivewindow
function resposivewindow(){
// Get the dimensions of the viewport
var width = window.innerWidth ||
document.documentElement.clientWidth ||
document.body.clientWidth;
var height = window.innerHeight ||
document.documentElement.clientHeight ||
document.body.clientHeight;
if(width==1320){ $('.sumitselect').addClass('form-control');}
@andyf-7
andyf-7 / Jqeury multi div scrol
Created May 3, 2015 10:58
J query Scroll bar detected and others div scrol
jQuery(
function($)
{
$('#thetable').bind('scroll', function()
{
var s = parseInt($(this).scrollTop()) ;
$('#right').scrollTop(s);
})
}
@andyf-7
andyf-7 / jquery like search on table
Created May 3, 2015 10:54
Search table in all td value on like match its only client side use js
function searchdata()
{
var values=$('#vardata').val();
$('#search_textdata').find('tr td a').each(function ()
{
@andyf-7
andyf-7 / Table tr sorting ascending
Created May 3, 2015 10:52
Table all tr ascending wise sorting
$(document).ready(function() {
$('table tr').sort(function(a, b){
return $('td:eq(0)', a).text() > $('td:eq(0)', b).text()
}).appendTo('tbody');
} );