Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

How to enable pinch to zoom using jQuery Mobile?

Posted on 2013-10-24
9
Medium Priority
?
1,854 Views
Last Modified: 2013-11-07
Experts,

I'm using jQueryMobile to build a mobile friendly page. All of my elements are working wonderfully across the many different devices I've tested but, I've not been able to enable pinching to zoom-in or out.

Does anyone know how I can do so with jQueryMobile or some other add-on to accomplish this? I'd like to enable the entire site to be pinchable but, if that is not possible, at least on some images.

Thoughts? Methods?
0
Comment
Question by:evibesmusic
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 4
9 Comments
 
LVL 58

Assisted Solution

by:Gary
Gary earned 2000 total points
ID: 39598143
This is a feature built into the phone - it's not something you need to program
Unless you are disabling it with user-scalable=no in your meta tags?
0
 

Author Comment

by:evibesmusic
ID: 39598452
@GaryC123:

Understood. I guess what I don't understand is that when I know a device like the iPad supports pinching, the mobile page still does not zoom? Is this due to browser settings?

Notes: The page that I am building is not an app. It is a mobile optimized web page.
0
 
LVL 58

Expert Comment

by:Gary
ID: 39598479
Can you post the html headers here (meta tags)
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:evibesmusic
ID: 39598501
@GaryC123:

Only two meta tags:

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1">
0
 
LVL 58

Expert Comment

by:Gary
ID: 39598512
Can you post the site link?
What phone are you testing on? What OS version?
0
 

Author Comment

by:evibesmusic
ID: 39598641
@GaryC123:

Sorry but, the site is behind my company's firewall.

I've been testing on iOS 6 and 7 for both the iPhone and iPad.

I've also been testing on Android 3.2 and 4.0.
0
 
LVL 58

Accepted Solution

by:
Gary earned 2000 total points
ID: 39598664
Add this into your scripts


$(document).bind('mobileinit', function(){
       $.mobile.metaViewportContent = 'width=device-width, minimum-scale=1';
});
0
 

Author Comment

by:evibesmusic
ID: 39598868
@GaryC123:

Added to my scripts. No change. I guess it is not a huge deal seeing that jQM auto-sizes elements to meet the needs of each device but, just odd.
0
 

Author Comment

by:evibesmusic
ID: 39631413
@GaryC123:

I've still not figured out how to enable the pinch to zoom function but, it is not needed...would just be nice to have. I am going to close this question and award you points based on your suggestions.
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction Knockoutjs (Knockout) is a JavaScript framework (Model View ViewModel or MVVM framework).   The main ideology behind Knockout is to control from JavaScript how a page looks whilst creating an engaging user experience in the least …
This article describes how to create custom column layout styles for Bootstrap. The article uses 5 columns to illustrate the concept, but the principle can be extended to any number of columns.
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
Suggested Courses

618 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question