Skip to content
This repository has been archived by the owner on Feb 27, 2018. It is now read-only.

Twipsy breaks when using latest jQuery (Uncaught TypeError: Cannot read property 'webkit' of undefined) #25

Open
fraktalfabrik opened this issue Feb 4, 2013 · 6 comments

Comments

@fraktalfabrik
Copy link

This took me forever to find!

This will work fine:

<!DOCTYPE html>

<head>

<title>Test me</title>

<script src="http://code.jquery.com/jquery-1.7.min.js&quot;&gt;&lt;/script>

<script src="/assets/fbootstrap/js/bootstrap-twipsy.js"></script>

</head><body></body></html>

Where as this will not:

<!DOCTYPE html>

<head>

<title>Test me</title>

<script src="http://code.jquery.com/jquery-latest.js&quot;&gt;&lt;/script>

<script src="/assets/fbootstrap/js/bootstrap-twipsy.js"></script>

</head><body></body></html>

It throws: "Uncaught TypeError: Cannot read property 'webkit' of undefined" in Chrome & FF.

@chriskarimi
Copy link

This is because $.browser is deprecated in jQuery 1.9+

@vikas-github
Copy link

so whats the solution here?

@chriskarimi
Copy link

The jQuery.browser() method has been deprecated since jQuery 1.3 and is removed in 1.9. If needed, it is available as part of the jQuery Migrate plugin. We recommend using feature detection with a library such as Modernizr.

My solution was to downgrade jQuery to 1.8.3 or any compatible version for that matter.

@magic890
Copy link

No updates or fix for Bootstrap?

@wnghdcjfe
Copy link

use jquery1.8.3

@zhoupeihuang
Copy link

thankyou @wnghdcjfe

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants