Hi folks - not sure where to post this, but I’ve just finished my first round of development on a new app that is built on CI and uses Jquery Mobile too.
Would be great to hear any feedback you might have.
Cheers!
Gregor
This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.
The active forums are here.
October 09, 2012 10:40am
Subscribe [2]#1 / Oct 09, 2012 10:40am
Hi folks - not sure where to post this, but I’ve just finished my first round of development on a new app that is built on CI and uses Jquery Mobile too.
Would be great to hear any feedback you might have.
Cheers!
Gregor
#2 / Oct 15, 2012 12:06pm
Hi, you site is fantastic.
I am looking for the way to create, website using jquery.mobile and in codeigniter. I am very good in Codeigniter but I never work in jquery mobile, I don’t know where to start and how to organize the structure for the site.
If you can help me, I will be very thankful to you in advance.
Thanks
#3 / Oct 15, 2012 5:17pm
Sure, no problem
All you need to do is:
1) Link to JQ and JQM in your header using the CDNs that JQM provide: http://jquerymobile.com/download/
2) Then use the docs to create the “views” you need. Here is the anatomy of the page for example: http://jquerymobile.com/demos/1.2.0/docs/pages/page-anatomy.html
The JQM documents are very good and informative. Also you don’t need to use the CI JavaScript class
Let me know if you have any problems
#4 / Oct 17, 2012 5:19am
Hi gregormck,
Thanks for your kind help. I have started some bit of work and it is showing some contents.
But I having issue when I want to update content dynamically on main page. I don’t know I may not be doing it correct.
- I have created one main page that only have <div data-role=“page” id=“main_page”></div> in body.
- what I want to do is I want to place contents(header, contents and footer) dynamically into that div.
- I have this code that place the contents in the main_page div
application.get( ‘view’, self.section ).render($(’#main_page’), contents);
$.mobile.changePage($(’#main_page’), { transition: "slide"});
- the issue here is it place the contents properly but they are not formatted at all.
- if I place all those contents in the main_page div directly and refresh the page they work fine and keep proper formatting.
can you please guide if, in putting dynamic content into the main_page div, or this is incorrect can you please tell me the proper way to updated the contents dynamically.
will be very helpful if you provide me some code examples with one full dynamic flow and updating contents.
I am totally new to jQuery mobile so please ignore any mistake 😊
Thank you very much in advance.
Tahir Awan
#5 / Oct 17, 2012 4:23pm
I’m not entirely sure I understand what you’re trying to do, but the page will display what ever content / data your CI controller pushes to the view i.e.
$this->load->view('templates/page', $page_data, TRUE);Copy and paste your view mark up and I’ll have a look (use the code syntax for easier reading too!)
#6 / Oct 18, 2012 10:17am
Hi gregormck,
After doing some research and playing with the code I am able to fetch the dynamic pages, Actually what I wanted to do is keep one index file will all header and body tags without data-role=“page” tag, and to place these page tags dynamically into that index file. This is now achieved.
But I m having one issue with navigation, as I am using some different way to call CI controller and methods. I am calling them like this example url “#!controller/methods”.
Now the issue is when I click on any link on the page, it first remove the # and change the url to “!controller/methods”. Than at the same time if I click the same link again it work an open the page.
I am using [$.mobile.hashListeningEnabled = false;] this as well. but not seems to be working.
any idea about this.
Thanks again for the help
Regards