CodePaste Logo
New Snippet New Snippet Recent Snippets Recent Snippets My Snippets My Snippets Web Code Search Snippets Search
Sign inor Register
Format:
Recent snippets matching tags of jquery
$(document).ready(function () {
    if (window.location.protocol == 'https:') {
        $("a[href^='http:\/\/" + window.location.hostname + "']").each(function() { 
               this.href = this.href.replace(/^http:/i, "https:");
           });
    };
});
by Javier Callico   January 24, 2012 @ 7:27am
18 Views
no comments
 
my code here. 
by JasonLeeTrott   December 08, 2011 @ 1:07am
61 Views
no comments
 
(function ($) {
 
$.fn.timeKeys = function (options) {
    /// <summary>
    /// Attaches a set of hotkeys to time fields
    /// + Add minute - subtract minute
    /// H Subtract Hour R Add houR
    /// ? Show keys
    /// </summary>
    /// <param name="options" type="object">
by Rick Strahl   November 28, 2011 @ 5:21am
Tags: Time, jQuery, Input
274 Views
no comments
 
jQuery(document).ready(function(){
    jQuery(document).ajaxSend(function(e,XHR,options){
        //loading提示
        hb.util.Message.show({
            msg:hb.util.context.msg.comm_loading,
            isCompleteClear:true,
            bar:[]
        });
        
    }).ajaxError(function(e,XHR,settings,thrownError){
by x03570227   November 03, 2011 @ 7:21pm
72 Views
no comments
 
/* Google jquery CDN 
 <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js"></script> */
   
            $.ajax(
            {
                type: "POST",
                contentType: "application/json; charset=utf-8",
                url: "services/FeedService.svc/ServiceMethod",
                data: '{"param1":"data1" , "param2":"data2"}',
                dataType: "json",
by frank2tek   October 04, 2011 @ 11:25am
63 Views
no comments
 
C#
/// <summary>
/// Internally used Page instance so we can get access to
/// a Page instance when no Page might be available. To Access ClientScript etc.
/// </summary>
private static Page CachedPage
{
    get
    {
        if (_CachedPage == null)
            _CachedPage = new Page();
by Rick Strahl   September 19, 2011 @ 3:27pm
Tags: jQuery
85 Views
1 comments
 
$('input:checkbox').addClass(function (index, currentClass) {
    var addedClass;
 
    if (currentClass === "") {
        addedClass = "rTick";
    }
 
    return addedClass;
});
by Badz   June 29, 2011 @ 7:32pm
104 Views
no comments
 
$(window).load(function() {
    (function ($) {
        $.fn.vAlign = function() {
            return this.each(function(i){
            var ah = $(this).height();
            var ph = $(this).parent().height();
            var mh = (ph - ah) / 2;
            $(this).css('margin-top', mh);
        });
    };
by Rashad Bayramov   June 18, 2011 @ 6:30am
124 Views
1 comments
 
$.ajax({
  url: 'Service.asmx/Method',
  type: 'POST',
  contentType: 'application/json',
  data: '{"Parameters":"Must be JSON strings!"}',
  success: function(response) {
    // Don't forget that the response is wrapped in a
    //  ".d" object in ASP.NET 3.5 and later.
    console.log(response.d);
  }
by jaredmroberts   June 14, 2011 @ 10:16am
99 Views
no comments
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>JQuery for Absolute Beginners</title>
    <script src="http://ajax.aspnetcdn.com/ajax/jquery/jquery-1.5.1.js" type="text/javascript"></script> 
    <!--<script src="http://ajax.aspnetcdn.com/ajax/jquery/jquery-1.5.1.min.js" type="text/javascript"></script>-->
    <link href="Content/Play.css" rel="stylesheet" type="text/css" />
 
    <script type="text/javascript">
        $(document).ready(function () {
by Jose David Parra   May 01, 2011 @ 5:12pm
181 Views
no comments
 
if (!JSON) {
    // Autoload JSON2.js if possible
    // Note: if using a script loader you may have to explicitly load json2.js
    //       assumes loading from same folder as this script
    var scripts = $("script");
    var src = null;
    scripts.each(function (i) {
        src = $(this).attr("src");        
        if (src && src.toLowerCase().indexOf("serviceproxy.") > -1) {
            src = src.toLowerCase();
by Rick Strahl   April 05, 2011 @ 9:57pm
356 Views
no comments
 
$.ajaxSetup({ 
            converters: { "text json": function (jsonString) {
                var res = JSON.parseWithDate(jsonString);
 
                if (res && res.hasOwnProperty("d"))
                    res = res.d;
                return res;
            } }
});
by Rick Strahl   April 05, 2011 @ 8:05pm
227 Views
no comments
 
$("#loading_animation").bind({
    ajaxStart: function() { $(this).show(); },
    ajaxStop: function() { $(this).hide(); }
});
by jaredmroberts   January 28, 2011 @ 1:00pm
495 Views
no comments
 
function updatePerson() {
    
    person.firstName = "Jimmy";
    person.lastName = "Row";
    $(person).trigger("changeData",["firstName",person.firstName])
             .trigger("changeData",["lastName",person.lastName]);
}
by Rick Strahl   October 25, 2010 @ 2:36pm
349 Views
no comments
 
jQuery("#list").tableDnD({
 
    onDrop: function(table, row) {
 
        var oldIndex = row.id;
 
        var newIndex = row.rowIndex;
 
        if (oldIndex == newIndex)
by ZStyle   August 24, 2010 @ 11:16pm
392 Views
no comments
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
<link rel="stylesheet" type="text/css" media="screen" href="/css/redmond/jquery-ui-1.7.2.custom.css" />
<link rel="stylesheet" type="text/css" media="screen" href="/css/ui.jqgrid.css" />
<script src="/js/jquery-1.3.2.min.js" type="text/javascript"></script> 
<script src="/js/grid.locale-en.js" type="text/javascript"></script>
<script src="/js/jquery.jqGrid.min.js" type="text/javascript"></script>
by ZStyle   August 24, 2010 @ 11:13pm
1028 Views
no comments
 
$(document).ready(function() {
 
    // Initialise the first table (as before)
    $("#table-1").tableDnD();
 
    // Make a nice striped effect on the table
    $("#table-2 tr:even').addClass('alt')");
 
    // Initialise the second table specifying a dragClass and an onDrop function that will display an alert
    $("#table-2").tableDnD({
by ZStyle   August 24, 2010 @ 11:09pm
553 Views
no comments
 
function(a){if(a=$(typeof a=="string"?"#"+a:a).get(0)){a=a.contentWindow||a.a;if(a.document)a=a.document;return a}};
by Nordin   July 27, 2010 @ 10:40pm
Tags: jQuery
204 Views
no comments
 
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>Html Template</title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
 
    <style type="text/css">
        .primary { background-color: green; }
        .secondary { background-color: blue; }
by jwwishart   June 16, 2010 @ 4:02pm
783 Views
no comments
 
/*
Refresh page content every 10 seconds.
*/
 
setInterval(function() 
{
   $("#refresh").load(location.href+" #refresh>*","");
}, 10000); // seconds to wait, miliseconds
 
/*
by Norm Bell   June 02, 2010 @ 2:21am
Tags: jQuery
193 Views
no comments
 
brought to you by:
West Wind Techologies



If you find this site useful and use it frequently please consider making a donation to support this free service.
Donate