Optionsoption: default - addGlossToIcon: true - Set to false to prevent automatic glossy button effect on icon.
- backSelector: '.back, .cancel, .goback' - A CSS selector for back links/buttons. When clicked, the page history goes back one, automatically reversing whichever entrance animation was used.
- cacheGetRequests: (New!) true — Automatically caches GET requests, so subsequent clicks reference the already loaded data.
- cubeSelector: (New!) '.cube' — Link selector for a cube animation.
- dissolveSelector: (New!) '.dissolve' — Link selector for a dissolve animation.
- fadeSelector: (New!) '.fade' — Link selector for a fade animation.
- fixedViewport: true - Removes the user's ability to scale the page. Ensures the site behaves more like an application.
- flipSelector: '.flip' - Link selector for a 3d flip animation.
- formSelector: 'form' - Sets which forms are automatically submitted via Ajax.
- fullScreen: true - The website will become a fullscreen application when saved to a user's home screen. Set to false to disable.
- fullScreenClass: 'fullscreen' - Adds a class to the <body> when running in full-screen mode, to allow for easy detection and styling. Set to false to disable.
- icon: false - Sets the home screen icon for the application. To use, pass a string path for a 57x57px PNG. Ex: icon: 'images/appicon.png'
- initializeTouch: 'a, .touch' - Selector for items which are automatically given expanded touch events. This makes ordinary links more responsive and provides trigger events like swipe
- popSelector: (New!) '.pop' - Link selector for a pop animation.
- preloadImages: false - Pass an array of image paths to load them before page loads. Ex: ['images/link_over.png', 'images/link_select.png']
- slideSelector: 'body > * > ul li a' - Link selector for the default slide-left transition. By default applies to all links within an unordered list. Accepts any jQuery-capable selector 'li > a, a:not(.dontslide)', etc.
- slideupSelector: '.slideup' - Link selector for a slide up animation.
- startupScreen: (New! 3.0 only) null - Pass a string path to a 320px x 460px startup screen for full screen apps.
- statusBar: 'default' - Styles the status bar when running as a fullscreen app. Other options are black, and black-translucent.
- submitSelector: (New!) '.submit' - Selector which, when clicked, will submit its parent form (and close keyboard if open).
- swapSelector: (New!) '.swap' — Link selector for 3d swap animation.
- useAnimations: (New!) true — Set to false to disable all animations.
|
Fantastic!
Thank you very much! n_n
Why are forms automatically submitted by AJAX?
It seems as though jQTouch hardwires its form actions and general link actions to the href attribute... and assumes the href attribute is client-side. To circumvent this assumption for AJAX, it appears you require all AJAX requests are tunneled within a FORM element?
Do I have this right?
Forms are just submitted via Ajax for convenience. To turn this off, just pass formSelector: false in your init options. You could also do by class (or any other CSS selector), ala formSelector: '.ajaxform'. You have total control on how much jQTouch does automatically-
Is there a way to set the textarea in the forms demo to 1 col so I can use autogrow? setting cols=1 makes no difference .
initializeTouch in beta1 is now touchSelector in beta2
Is there any way to force the ajax form submit to use json? I'm still digging and haven't found a way to do this - yet. Thx.
Ok, I dug a bit. Not sure if this is the best way, but it works for r109.
I added the following lines:
441: dataType: settings.dataType, 474: dataType: "json",
This forces all form submits to be json - for me this is good since my app is a prototype for eventual iphone sdk apis.
Now I just have to figure out how to handle the success and error callbacks..
Hi All
Loving jqtouch! Im struggling with the AJAX side of things.... Wanting to submit basics via ajax, but not really within a form, or using a input (button). E.g. just taking on the <li> which has an ajax event - updating the page a little and sending the page to a return ID.
Is there any examples out there.
Also im writting up my experiences on learning jqtouch with tutorials, can we extand this wiki to include them to help newbies?
Matt
how does one use the jQT.formSubmit() function? I'm wanting to pragmatically submit a form just as if the user pressed the submit button... (ie form results returned via ajax...) $('formid').submit() seems to bypass jQtouch's ajax method... jQT.formSubmit('formid') seems to submit the form, but results are not shown... I see there's a 2nd callback parameter...
I found the issue with formSubmit(): http://code.google.com/p/jqtouch/issues/detail?id=166
What is the best way to re-init a DIV once I add information from an AJAX call. I can build out the <LI> items, give them the right classes, but the touch doesn't seem to work correctly. I thought it might be because it's not blessed by the initialization routines. How can I get the jQT object to init the new <LI> items I create?
(Thanks. This is a wonderful project.)
How can I change an option after it has been initialized? I initialize useFastTouch: false. I want to later on when I am in a DIV to make it useFastTouch: true
Is it possible to just turn off animations on the ajax form submissions? I have a form that returns multiple video tags and Safari will crash when it animates back to the form if animations are on. But I'd still like the animations on my non video content.
Is it possible to detect if the app has been launched from the home screen as opposed to via safari?
how to add loading image in Ajax Post form ?
Doeas someone has an answer to this question "how to add loading image in Ajax Post form ?"?
Thank you!
How can I stop an application from rotating when the phone is flipped? I do not see such option...
Why does the viewport get scrolled to the top when any animation starts, can I turn this off?
Hello, is there a way to make copy paste work on a specific class or smth like that ?
The statement about the default for the slideSelector is not correct - it will only apply with something like {{{ body > div > ul li a
@afahmed: if($("body").hasClass("fullscreen")) alert('launched as app'); if(!$("body").hasClass("fullscreen")) alert('launched in safari');
Hi,
I have a HTC Desire and trying to get JQTouch to go fullscreen.
Has anyone had success using JQTouch eith Android 2.1 browser?
Thanks
Paul
I'm seeing a lot of questions, and not too many answers. Is jQTouch still an active project? Anyone know of an iPhone JS lib with better documentation/support? Anyone have experience with Sproutcore?
"not too many answers"
join the Google Group ... everyday there is a bunch of questions and answers :)
Google Project does not have any "send email upon comment added" so it's rare that someone came here and answer, our group is available and very active.
http://groups.google.com/group/jqtouch
Hi, does anyone know how to turn off orientation event, i what my webapp to be portrait even when it is moved.
Here's a question for you all. How can I tell when it's safe to setup a tap event? I typically do that sort of thing after the document ready fires in jQuery. Problem is, how can I guarantee my ready fires AFTER jqTouch is all initialized?
I have been using rev-148 for a while now, and just downloaded rev-150. Now all of my external links don't work. Upon tapping on my iPhone (or clicking in Chrome on my PC) they don't go anywhere. Any suggestions on how to fix this?
Thanks to anyone who can give me some help.
- Hugh