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 language of JavaScript
<script type="text/javascript">
Friday @ 9:10am
Tags:
11 Views
no comments
 
$(".zoom a").click(function() {
    $(".ctnt").toggleClass("font-big");
    $(this).toggleClass("font-big");
    
    // Here I want to toggle the cookie value
    if ($(this).hasClass("font-big")){
        $.cookies.set("textSize", "font-big", {expires: 0});
    } else {
        $.cookies.del("textSize");
    }
Friday @ 1:38am
Tags:
13 Views
no comments
 
alert()
February 01, 2012 @ 7:12pm
Tags:
10 Views
no comments
 
// Widget
(function( $ ) {
  $.widget( "myWidget.myWidget", {
 
    // These options will be used as defaults parameters
    options: { 
      clear: null ,
      param1: '0',
      param2: '1',
      data: {},
January 31, 2012 @ 7:24am
Tags:
8 Views
no comments
 
function fontsLoaded() {
    alert("Weehaa!");
}
testFonts(["Arial", "Helvetica"], fontsLoaded);
by smnh   January 31, 2012 @ 5:38am
Tags:
15 Views
no comments
 
// Widget
(function( $ ) {
  $.widget( "demo.multi", {
 
    // These options will be used as defaults
    options: { 
      clear: null 
    },
 
    // Set up the widget
January 31, 2012 @ 5:26am
Tags:
13 Views
no comments
 
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <title>TEST</title>
    </head>
    <body>
        
        <script language="JavaScript">
            var thisweekslunch = function(result) {
                console.log(result);
January 30, 2012 @ 5:47pm
Tags: abaab2
20 Views
no comments
 
<script type="text/javascript">
    $(document).ready(function() {
    $("div#new > marquee#news a").fancybox({
            'width': '75%',
            'height': '100%',
            'autoScale': false,
            'transitionIn': 'none', //elastic
            'transitionOut': 'none',
            'type': 'iframe'
        });
January 28, 2012 @ 11:53am
Tags:
15 Views
no comments
 
$(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
17 Views
no comments
 
try { document.execCommand("BackgroundImageCache", false, true); } catch (e) { }
var popUpWin;
function PopUpCenterWindow(URLStr, width, height, newWin, scrollbars) {
    var popUpWin = 0;
    if (typeof (newWin) == "undefined") {
        newWin = false;
    }
    if (typeof (scrollbars) == "undefined") {
        scrollbars = 0;
    }
by medyunhavba   January 17, 2012 @ 12:56am
Tags: js, commen.js
17 Views
no comments
 
Zhao, fruit a college was taught such a concept, even if slightly unwilling heart, but it is just like the wind, as passed, does not leave any traces. She thought, when the teacher is also not a bad thing, why should toss it? She managed to jump from the rural areas of the city, but also the heart of the capital known as the motherland before leaving parents and elders kept asking to listen to the teacher, to clamp tail man, how dare she act rashly?
Zhao Lei, but chose not to believe on this evil, he is to study section, would rather escape have specialized self-study section, in short, is not a teacher.
Zhao, fruit class the majority of Beijing students, foreign students are only a few 35, this is to increase Beijing middle school teachers deliberately swap over from the field. cheap coach pursesZhao, fruit they are to give way with a score of the two schools, was inexplicably only to a "Capital Complex" at work, I feel like reading into the Beijing big splash is good to ask for the moon , available on this school he realized there is no free lunch, a big splash at the expense of Dragon Inn from where we should stay in the lackey, within five years shall not stand.
Zhao, fruit observers was unsuccessful predecessors tossing hand, harm to endless stories of sudden heart Qieyi, before the toss of a heart no gas, just over four years, and so on, be honest to do the human soul to the water. She pokes fun at himself and said, I can not do great, you can not do great teacher?
Zhao Lei refused to sit still, and actively seek a way out, a public Beijing classmates sit and watch where he is doing useful work, that he himself. Zhao Lei do not think so, but still down personal gain. Zhao, fruit is aware of his family, and on family conditions, he is only more unbearable than she, out of the mountains to thediscount coach purses plight of children for no more than an vicious than others, outsiders see Zhao Lei just think he smart, cheerful Junshuai, where known behind the scenes of his infinite hardships, Zhao, fruit only know that he walked every step of paying ten times more than the common price, such a person willing to let him how to when an ordinary teacher, holding a lukewarm salary be able to live a glancing header of the day?
Hard to see him toss, Zhao fruit secretly for his 捏一把冷汗. The first semester of senior year, Zhao Lei I do not know where to find out within a year the department has two out of the "mouth" places such as confidentiality, he first ran excitedly told his girlfriendCoach purses outlet that time is not the fruit of Zhao, expect She is also excited to meet him the same. Surprisingly, Zhao fruit but with the vision to see the aliens looked at him, but also on what to do, prompting Zhao Lei grouchy. Depressed owned depressed, Zhao Lei, or just keep looking up and down relationship between the RBI, in the end, after he admitted to the university, the department actually incensed him go, but also agreed that he allowed them to postpone the system costs.
Wait until you run into a wall around to find work when Zhao Lei had a look calmly at the quarters of the school. Zhao, fruit heard the news just stunned to realize that what is called "Hard work pays off." Zhao Lei do not find a job, but without learning, empty out all the time spent to make plans for Zhao, fruit on the way to graduation, but unfortunately the fruit refuses to enlighten Zhao, Zhao Lei plan for a long time, tireless in teaching a long time, eventually a river flows to the east , Zhao, fruit made up his mind going to that first reply to her high school Sheng sea.
Sheng Hai is a third-rate school, located in the Haidian District, next to, surrounding these are rural areas, poor students, Zhao Lei left to persuade the right to persuade no effect, while the last rage directed at the corrupt fruit Zhao shouted: "You wait a lifetime schools in the garbage now! have you regret the time! I can regardless of your Wholesale shoes from chinabroken things! not seen you silly man! "
Zhao, fruit still and not be angry, so Zhao Lei cried over, and she rather abruptly blurting: "You are my people? So for me to worry about?"
Zhao Lei what to say, half embarrassment, red stretching face off in a huff.
by popo8   December 12, 2011 @ 8:59pm
Tags:
22 Views
no comments
 
//An example of how to generate a chart using the high chart plugin, and reading from an xml file
function generatUptimeChart() {
    theme = 'dark-blue';
 
    var options = {
        chart: {
            renderTo: 'container',
            type: 'line'
        },
        title: {
by Gerhard   December 01, 2011 @ 10:20pm
Tags:
89 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
272 Views
no comments
 
/**
 * JS联动菜单工具,适用于code形式的树型类别,如code:10001000 父code:1000
 * 示例:
 * var selector=new hb.util.Selector({
 *         url:"/path/to/main/seletor/resources",
 *         assistUrl:"/path/to/assist/selector/resources",
 *         changeCallback:function(){
 *             alert("alert while selector change")
 *         },
 *         field:{code:"code",label:"name"}
by x03570227   November 09, 2011 @ 9:11pm
42 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
 
/**
 * 系统消息提示工具
 * 示例:
 * 显示消息
 * hb.util.Message.show({
 *         msg:"message text",
 *         msgType:hb.util.Message.ERROR,
 *         bar:[{text:hb.util.Message.BAR_CLOSE,handler:function(){
 *             hb.util.Message.clear();
 *         }}],
by x03570227   November 03, 2011 @ 7:17pm
52 Views
no comments
 
// Title: surge.string.js
//
// Provides an interface to doing a string based search where ordering does not matter on a per word basis.
// Example: Providing "Dog Food" as the input, and testing against "abcFOODabcDOGabc" would result in "true"
//    while testing against "abcDOGabc" would result in false.
//
Surge.Class("Surge.SuperSearch", Surge.Component, {
    _compiled: undefined,
    caseInsensitive: true,
by Joe Lennox   November 01, 2011 @ 4:56pm
Tags:
29 Views
no comments
 
Define("Surge.Debug", {
    dumpElementTree: function(jQueryElement) {
        var element = $(jQueryElement);
        var tree = [
            '<style type="text/css">',
                '.surge-debug-dump .control-structure { color: rgb(0,0,136); }',
                '.surge-debug-dump .element-name { color: rgb(117,93,255); }',
                '.surge-debug-dump .attribute-name { color: rgb(0,0,136); }',
                '.surge-debug-dump .attribute-value { color: rgb(255,0,51); }',
                '.surge-debug-dump .data-name { color: rgb(75,0,130); }',
by Joe Lennox   October 29, 2011 @ 4:32pm
Tags:
28 Views
no comments
 
<UserId>hckj6ff7</UserId>
by jayb   October 22, 2011 @ 4:20pm
Tags:
56 Views
no comments
 
<!DOCTYPE html><html lang="es" id="facebook" class="no_js">
by jayb   October 22, 2011 @ 3:57pm
Tags:
63 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