<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
    主站蜘蛛池模板: 亚洲日本乱码一区二区在线二产线 | 在线观看免费宅男视频| 永久免费AV无码网站在线观看| 免费无码看av的网站| 亚洲国产精品一区二区第四页 | 亚洲精品午夜无码电影网| 亚洲av无码乱码国产精品| 亚洲美女视频免费| 中日韩亚洲人成无码网站| 免费福利资源站在线视频| a级毛片毛片免费观看久潮喷| 99久久人妻精品免费二区| 成年女人喷潮毛片免费播放| 亚洲第一页综合图片自拍| 亚洲av丰满熟妇在线播放| 亚洲卡一卡二卡乱码新区| 男女交性无遮挡免费视频| 久久aⅴ免费观看| 成人毛片免费观看视频在线| 亚洲午夜爱爱香蕉片| 亚洲视频在线一区二区三区| 亚洲精品女同中文字幕| 中文字幕av无码不卡免费| 97性无码区免费| 亚洲国产综合精品一区在线播放| 亚洲AV无码不卡在线播放| 亚洲色偷偷色噜噜狠狠99| 韩国免费a级作爱片无码| 国产福利在线观看免费第一福利| 丁香亚洲综合五月天婷婷| 亚洲人成影院在线| mm1313亚洲国产精品无码试看| 在线观看片免费人成视频无码| 最新免费jlzzjlzz在线播放| 中文字幕亚洲一区二区va在线| 亚洲最大成人网色香蕉| 国产精品免费一区二区三区| av免费不卡国产观看| 国产亚洲精品拍拍拍拍拍| 亚洲人成7777| 久草免费福利视频|