<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    posts - 495,comments - 227,trackbacks - 0

    /*
    <--- --------------------------------------------------------------------------------------- ----
        
        Blog Entry:
        Creating jQuery Templates Plug-in Using Textarea Elements (Thanks Kurt Bonnet)
        
        Code Snippet:
        2
        
        Author:
        Ben Nadel / Kinky Solutions
        
        Link:
        http://www.bennadel.com/index.cfm?dax=blog:1393.view
        
        Date Posted:
        Nov 10, 2008 at 9:06 AM
        
    ---- --------------------------------------------------------------------------------------- --->
    */

    // Define the jQuery Template plugin. This takes a textarea
    // value and converts it into an jQuery DOM elements (outside
    // of the current DOM) and returns it. It takes only one
    // argument: the name-value pairs of the values to replace
    // into the template.
    jQuery.extend({template:function (strHTML, objValues) {
     
        // This will be our index variable for looping over the
        // values that were passed in.
        var strKey = "";
     
        // Check to make sure we have a value string. If this is
        // not the right kind of jQuery stack, the HTML string will
        // be null.
        if (strHTML) {
     
            // Now that we have the proper value, we have to
            // replace in the mapped values. Loop over each
            // value that was passed in.
            for (strKey in objValues) {
     
                // Escape all the special values in the key so that
                // it can be used in a regular expression.
                strSafeKey = strKey.replace(new RegExp("([""[""]"".""+""*""{""}""("")""$""?""-])", "gi"), """$1");
     
                // Replace the value.
                strHTML = strHTML.replace(new RegExp("""{" + strSafeKey + """}", "gi"), objValues[strKey]);
            }
     
            // At this point, our HTML will have fully replaced
            // values. Now, let's convert it into a jQuery DOM
            // element and return it.
            return (jQuery(strHTML));
        } else {
     
            // Return empty jQuery stack.
            return (jQuery([]));
        }
    }});

    posted on 2008-11-17 13:23 SIMONE 閱讀(765) 評論(0)  編輯  收藏 所屬分類: AJAXJavaScript
    主站蜘蛛池模板: 亚洲国产另类久久久精品小说 | 免费播放一区二区三区| 久久精品亚洲一区二区三区浴池| 日本亚洲免费无线码| 国产成人亚洲午夜电影| 国产亚洲一区二区在线观看| 国产精品免费观看| 免费一级毛片在线播放放视频| 亚洲综合av永久无码精品一区二区| 猫咪免费人成网站在线观看| 亚洲av无码专区首页| 亚洲av无码不卡| 男女交性永久免费视频播放 | 久久国产精品亚洲一区二区| 毛片免费vip会员在线看| 亚洲午夜精品国产电影在线观看| 国产成人免费高清在线观看| 久久午夜羞羞影院免费观看 | 国产无遮挡裸体免费视频在线观看| 亚洲日韩乱码中文字幕| 亚洲爆乳无码专区| 日韩精品无码人妻免费视频| 午夜理伦剧场免费| 久香草视频在线观看免费| 中文字幕亚洲综合小综合在线| 国产精品久久久亚洲| 18禁无遮挡无码网站免费| 国产精品免费大片| 麻豆一区二区三区蜜桃免费| 亚洲婷婷第一狠人综合精品| 亚洲精品自产拍在线观看动漫| 亚洲国产成人久久综合一区77| 一级视频免费观看| 亚洲日韩国产二区无码| 亚洲国产精品一区| 中文字幕专区在线亚洲| 国产精品二区三区免费播放心| 亚洲美女免费视频| 无码人妻一区二区三区免费看 | 无码区日韩特区永久免费系列 | 国产免费的野战视频|