<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 閱讀(773) 評論(0)  編輯  收藏 所屬分類: AJAXJavaScript
    主站蜘蛛池模板: 成年女人毛片免费播放视频m| 免费国产黄网站在线看| 嫩草在线视频www免费看| 国产成人精品久久亚洲高清不卡 | 在线观看亚洲免费视频| 亚洲av永久无码精品表情包| 美女网站在线观看视频免费的| 亚洲国产成人VA在线观看| 香蕉国产在线观看免费| 久久久久久亚洲精品不卡| 久久免费香蕉视频| 亚洲AV无码专区亚洲AV伊甸园| 久久aa毛片免费播放嗯啊| 久久精品国产亚洲av高清漫画| 99无码人妻一区二区三区免费 | 亚洲裸男gv网站| 国产A∨免费精品视频| 亚洲AV综合色区无码一区| 67pao强力打造高清免费| 亚洲精品天堂在线观看| 永久久久免费浮力影院| 一级毛片a免费播放王色| 亚洲永久精品ww47| 久久免费看黄a级毛片| 亚洲成在人线aⅴ免费毛片| 亚洲精品无码专区2| 全部免费毛片在线播放| 中文字幕精品三区无码亚洲| 亚洲成av人片不卡无码久久| 久久精品国产这里是免费| 亚洲а∨天堂久久精品9966| 免费国产怡红院在线观看| 成人网站免费看黄A站视频| 亚洲18在线天美| 亚洲国产成人影院播放| 最近免费中文字幕mv在线电影| 亚洲熟妇无码AV| 久久亚洲精品视频| 午夜一区二区免费视频| 久艹视频在线免费观看| 亚洲aⅴ无码专区在线观看|