Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

In chrome SwipeView interferes with jquery mobile #5

Closed
karussell opened this issue Nov 30, 2011 · 2 comments
Closed

In chrome SwipeView interferes with jquery mobile #5

karussell opened this issue Nov 30, 2011 · 2 comments

Comments

@karussell
Copy link

I know this is a mobile lib, but it works good on chrome (but not at alll in firefox 8?)

When adding the jquery mobile lib after or before including SwipeView then the SwipeView does not properly animate (only tested with the inline demo) It says:

Uncaught TypeError: Cannot read property 'style' of undefined (line 349, SwipeView.__checkPosition)

(BTW On Android SwipeView works with jquery mobile)

this can be prevented via $(window).load(function() { /* swipview init code */ }) or what do you suggest?

@jurgenbrouwer
Copy link

Hi, I think I had the same problem as you describe here.
The problem occurs because this.wrapper.clientWidth in the function refreshSize is not available when JQuery Mobile is loaded and defaults to zero. I guess it has something to do with the viewport it is in.

A work around for me was to get the clientWidth for the body (since my carousel has the same width).

So in refreshSize I set:

this.wrapperWidth = document.getElementById('body').clientWidth; //jquery mobile hack

I hope this helps.

@complexite
Copy link

Has there been any updates related to this issue?? I've tried the solution above but it doesn't seem to solve the issue.

Does anyone have additional solutions/suggestions on how to solve this?

dokterbob pushed a commit to visualspace/SwipeView that referenced this issue Jan 26, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants