Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What features of Zepto do not work on ie9?

Tags:

zepto

On the zepto project website i see no version of IE as being supported, not even 9.

I am considering using zepto in a webapp (not mobile) but i want to support IE 9+

Is that possible? What features / methods of zepto do not work on IE9?

like image 302
alexandru.topliceanu Avatar asked May 17 '12 07:05

alexandru.topliceanu


1 Answers

Out of curiosity I just loaded up the following page and tested in current versions of Chrome, Firefox, Safari and IE9. In all but IE9 I was greeted with the alert() message. IE9 gave me no alert and contained two errors in the console. Here's the code I used, with the Zepto library in the same folder.

<!doctype html>

<h1>Zepto Browser Support Test</h1>

<script src="zepto.min.js"></script>
<script>
  $(function () {
    alert('Zepto Ready Successful!');
  });
</script>

So, unfortunately for your web app, if you are trying to support IE9, it doesn't look like Zepto is going to work for you.

Although, what the good folks at Zepto encourage if you are trying to reach IE users is to fallback to jQuery. They even give you the code to do so.

If you need to support Internet Explorer, you can fall back on jQuery. Note that conditional comments are no longer supported starting on IE 10, so we recommend the following document.write approach:

<script>
document.write('<script src=' +
('__proto__' in {} ? 'zepto' : 'jquery') +
'.js><\/script>')
</script>

I found this in the Zepto docs near the top of the page. Hope that helps and good luck!

like image 188
jasonmerino Avatar answered Oct 13 '22 21:10

jasonmerino