top



I want to hide Chrome

Θέλω να κρύψω τον Chrome... xD

if(browser.browserType.webkit) {
// do thinkgs
}

Ok so if I want to hide something or apply CSS to something would it be like that ??

Code:

if(browser.browserType.webkit) {
<style>.myclasshere{display: none;}</style>
}

its javascript not HTML.
you can use

if(browser.browserType.webkit) {
document.getElementById("id").style.display = "none";
}

Id does not work for me... :(

Code:
<script type="text/javascript">
if(browser.browserType.webkit) {
document.getElementById("nd").style.display = "none";
}
</script>

<div id="nd">I AM NOT DISPLAYED ON CHROME</div>
Some other text or content...

Chrome displays: "I AM NOT DISPLAYED ON CHROME"

sgeorge wrote:Id does not work for me... :(

Chrome displays: "I AM NOT DISPLAYED ON CHROME"

of course it wont work,wheres the browser object? XD it will magically take it from my post and put it to your js XD

thats how its done

Code:
<script type="text/javascript">
/** Browser Detector part of Kindle Js ** /
ua = navigator.userAgent.toLowerCase();
var browser = {
browserType: (ua.indexOf("opera") != -1) ? "presto" : (ua.indexOf("msie") != -1) ? "trident" : (ua.indexOf("applewebkit/") != -1 && ua.indexOf("khtml") != -1) ? "webkit" : "gecko"
};

if(browser.browserType.webkit) {
document.getElementById("nd").style.display = "none";
}
</script>

<div id="nd">I AM NOT DISPLAYED ON CHROME</div>
Some other text or content...

Go to page : Previous  1, 2