문제

all I simply want to do is; if the browser is less than internet explorer 8 find and remove $(document).foundation();

<!--[if IE 8]>
   //code here
<![endif]-->
도움이 되었습니까?

해결책

Simply deleting a plugin like that, e.g.

<!--[if lt IE 8]><!-->
<script>
  delete $.fn.foundation;
</script>
<!--<![endif]-->

Will probably cause all sorts of problems and is generally a bad idea - see here for why.

Instead, just load the foundation() plugin/related scripts if the browser is IE8+ or a different browser:

<!--[if gte IE 8]><!-->
<script src="/js/foundation.min.js"></script>
// Other related scripts etc...
<!--<![endif]-->
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top