getScreenHeight() not compatible with jQuery.noConflict() #2225

Closed
stepro opened this Issue Aug 5, 2011 · 1 comment

Comments

Projects
None yet
2 participants
@stepro

stepro commented Aug 5, 2011

The getScreenHeight() function incorrectly uses "jQuery" instead of "$" when accessing the jQuery object:

function getScreenHeight(){
var orientation = jQuery.event.special.orientationchange.orientation(),
...
}

If you call jQuery.noConflict() after loading jQuery Mobile, "jQuery" will be invalid.

This function should be changed to use the "$" parameter passed to the outer function:

function getScreenHeight(){
var orientation = $.event.special.orientationchange.orientation(),
...
}

This issue was identified in the latest Git build.

@ghost ghost assigned gseguin Aug 5, 2011

@stepro

This comment has been minimized.

Show comment
Hide comment
@stepro

stepro Sep 21, 2011

Any update on when or if this might be fixed? This is a commonly used function in the library and many applications will not even start up without the fix if you call jQuery.noConflict(). I see from bug 346 that there was explicit work done to enable support for jQuery.noConflict() so perhaps you would get it in for the RC or the final release?

stepro commented Sep 21, 2011

Any update on when or if this might be fixed? This is a commonly used function in the library and many applications will not even start up without the fix if you call jQuery.noConflict(). I see from bug 346 that there was explicit work done to enable support for jQuery.noConflict() so perhaps you would get it in for the RC or the final release?

gseguin added a commit that referenced this issue Oct 21, 2011

@gseguin gseguin closed this Oct 21, 2011

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment