Jump to content
Killersites Forums

dynamically adding pages with jquery


Recommended Posts

I'm working on a mobile app using jquery mobile, and I have a page of my app that has links to around 50 items. I want to avoid creating 50 links and instead add the page dynamically whenever the user clicks the link to the page containing those 50 links. Any ideas how to dynamically add a page in jQuery, the documentation is kind of confusing so I was hoping someone could explain the process.

 

 

Thanks.

Link to post
Share on other sites

I'm not sure I understand what you are wanting...? Maybe you can try to explain it in a different way?

 

If I do understand what you are wanting... which is to use jquery to create a new page with 50 links, and then navigate to that page when a user clicks on a link to it... I would think the jquery involved in this task would be way more time consuming to write than the actual HTML for the page. One way or another, you still have to write the HTML and the links, just with jquery you'd have to do it all dynamically, inserting all of the HTML into the page a line at a time, and that would add an extra (unnecessary IMO) layer of complexity.

Link to post
Share on other sites
  • 3 weeks later...

The navigation bar is the perfect solution for your question. You can include your 50 links through navigate which just open with one click on given button. It keeps hidden all links till you are not required to use those links and also it doesn’t need to make a new web page. Java script takes less time to load web page so, it’s better to use this trick.

Edited by brainusa
Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...