JQuery: How do I get NoScript HTML to display it in a div div tag?

I've got a small script that detects if the user is using a certain browser

var is_chrome = navigator.userAgent.toLowerCase().indexOf('chrome') > -1;
if(is_chrome){
    $('.ifChrome').attr('style', 'display:block;');
    $('.ifChrome').html($('noscript > div').html());
};

If they are using this browser, we want to display a div tag and show the HTML from a different div tag inside.

<noscript>
    <div class="note">
        Your browser does not properly support the WMD Markdown Editor.<br />
        Please use <a href="/about/markdown" target="_blank">Markdown<.a> to style your input.
    </div>
</noscript>
<div class="hidden ifChrome note"></div>

What I'm trying to do is show the "not supported" text from inside my <noscript> tag to users who are using this browser (because WMD Markdown doesn't work properly with it).

My existing Javascript is not working. Any help would be greatly appreciated.

我来评几句
登录后评论

已发表评论数()

相关站点

+订阅
热门文章