i asked this in jquery forum, but maybe it's better here with jquery-mobile tag :
i've a problem i can't go through for 2 days... i'm a newbie in Jquery mobile so maybe you could quickly see the issue :
after an ajax call (to submit a form) i change div content with the ajax response, using $('confirmation').html(newcontent)
but the "new" div has not the cool jqm stylish button and content
then i added $('#confirmation').page(); it was OKAY... but it worked just for once : if i submit the form again, the jqm style dissapears...
i tried everything i found on the net, but still no solution... so i beg your help ;)
thanks by advance to everyone who will have the kindness of having a short look !
here's my example on jsfiddle : http://jsfiddle.net/ramdam/7cwBX/17/
if you click an Submit ajax button, you'll see a nice BACK button , but if you do it twice, the button "disappears" and only show a link...
Does this: http://jsfiddle.net/7cwBX/20/ helps you?
Is there any specific reason you are still using jQuery Mobile alpha 2 version?.To be safe,I would advice to always use the latest jQuery Mobile version-currently RC 1.0 . Update to RC 1.0 and try using $('#confirmation').trigger('create') instead of $('#confirmation').page().page() is deprecated since beta 2
FYI - I couldnt check out the fix because the domain you used in the example seems to be down.
Related
Have been bashing my head against the wall for a good day and a half now. Did everyone abandon old fashioned page structures to go to jQuery Mobile?
I have a webpage, tracks legislation. Main navbar goes as such:
/bills/list, /legislators/list, /committees/list
Where each link is rewritten into
index.php?category=$1&detail=$2
so /bills/list translates to
index.php?category=bills&detail=list
But when I load a page from the navbar, using an a href tag, the pages load all nice and easy using the AJAX loader, but the newly loaded pages 1. don't run scripts, and 2. don't display any formatting. This is a problem.
All the suggestions I have seen say to .bind something or .refresh or .trigger without any context of where that goes, and everything I have tried in that vein has frustrated me to no end.
Please help! And by the way, if I just data-ajax=false everything it works perfectly. But I want the quick loading that ajax gives! I just don't understand how it works and there are really no good pointers on the web I could find.
Code in this pastebin: http://pastebin.com/9jMxV0B6
You can see some artifacts of my struggling to get the thing working.
From what I gather, you shouldn't call new pages via a href, but then why the hell does jqm use href's for its nav menu? Is that supposed to call a function or something?
"But when I load a page from the navbar, using a basic old fashioned a href tag, the pages load all nice and easy using the AJAX loader, but the newly loaded pages 1. don't run scripts, and 2. don't display any formatting. This is a problem."
That happens because JQM ignores all the headers in all other pages besides the first page that loads. So if you want to do any changes to the page use page events, place them In first page.
I had problems understanding it also. Here is a link to my previous post that explains it a bit: How do I enable onload in jQuery mobile (open page both from link & load)?
Hope it clears some things for you. My recommendation for you is to do two simple pages and test simple URL functionality.
I wanna have a dropdown menu like this link: http://datatables.net/release-datatables/examples/basic_init/table_sorting.html
(The one that are right below "Live example" line);
I haven't got many experience of working with jQuery UI, and I guess that result is produced by using it. Could you suggest me a way to create that dropdown.
Thank you.
P/S: that may be ok if it is not using jQuery UI (it's just my guess)
That solution doesn't appear too complex - they've got all the data already, and they're just hiding rows depending on what's selected.
On the other hand, as that's an open source project, you could just download it or use the hosted versions and integrate it on your site, which is probably easier than rolling your own solution.
Ok, got it. This is just default style in Firefox (There's no style applying for it yet). I got this misunderstand due to changing browser.
I am working on latest nopCommerce V 2.65. I would like to provide a jquery slider which moves on arrow key as well as on mouse click on side arrow.
Plesae provide me any link or demo code.
Thanks in advance.
Check with these guys: http://www.nop-templates.com/p/4/nop-anywhere-sliders - I think that functionality is there, but if not, post it as a feature request on their board, and they'll usually add it within a short time, if it's a popular request.
I have the following issue.
In the following JSFiddle1 the dialogs allow the editing of folders and the editing of links.
In this JSFiddle2 I try to add JQuery UI tabs to the previous JSfiddle and apply the model to a div in one of the tabs
ko.applyBindings(foldersModel, document.getElementById("folders-view"));
the dialogs do not work.
Any ideas?
Your're not doing it right, use custom bindings handlers to achieve this instead.
And since I'm such a nice guy I've already made my own bindings public and with a JSFiddle togo with it.. :P
https://github.com/AndersMalmgren/Knockout.Bindings
http://jsfiddle.net/H8xWY/
Sorry, but I've never seen so many logic errors in a code before :D
Anyway, beacuse I was bored and are a nice guy i cleaned up the code somewhat and fixed the bugs
http://jsfiddle.net/uK5KL/20/
I'm not very great at javascript and i am having trouble mixing iscroll and jquery mobile. I am testing it on IOS
This is what I have;
http://m.filmrev.me
Both pages are scrolling but not in the correct way.
Would anybody be able to help with this.
Thanks
check this link
http://cubiq.org/dropbox/iscroll4/examples/simple/
And
yours example there are 2 same id for div and 'ul' .
try it change these ids.
ex..
in page, <div id='scroller '>
in page 2 ,
<div id='scroller''>
Have you tried the jQuery Mobile iscroll implementation - see here. This was done specifically for JQM.
However, the JQM devs have started their own scroller, called Overthrow. This is supposed to be more cross-platfrom compared to iscroll. I've used iscroll, scrollview (previous JQM scroller) and am now using Overthrow. Works ok and I found it fairly easy to implement.