Is it possible to hide a web-part only when user browse the site within Chrome?

I checked "Chrome State" - minimized, "Chrome Type" - none, the first sets web-part minimized both in IE and Chrome, the latter do not hides the web-part in Chrome, using easy-tabs script.

I am wondering if there is any jQuery which can solve the problem?


You can check browser with javascript as :

var is_chrome = navigator.userAgent.toLowerCase().indexOf('chrome') > -1;

And you can hide/disable web part as :

<script type=”text/javascript”>

MSOZoneCell_WebPartWPQ4 is the id of web part.

| improve this answer | |
  • Hi Aanchal, the browser check works, however the display "none" does not work in Chrome. – stoneclub Jun 22 '14 at 22:55
  • Have you replaced the code with your webpart I'd? – Aanchal Jun 23 '14 at 3:50
  • Yes, I replaced the code. – stoneclub Jun 23 '14 at 22:41
  • Can you share your code? – Aanchal Jun 24 '14 at 5:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.