KB Article 10189
2013/05/03

Close
X
Contact Tech Support

 Email Tech Support
 (250) 655-1766
 [7:30 - 5:00 PST]
Your Meeting ID will be Provided by a Rep.
Tech Support
Tech Support Home
Software Updates
Knowledge Base Search
Recent KB Articles
Product FAQs
Code Samples
Documentation
Tech Blog
System Requirements
Installation Instructions
Support Testimonials
Contact us to...
Create a Ticket
Request a Free Demo
Suggest a New Feature
Submit Feedback
Upload a Large File
Other Services
Software Training
Professional Services

Different types of links in jQuery Mobile

Product: WebSmart ILE Type: Frequently Asked Question

When using jQuery Mobile, an anchor tag for creating links has a pre-defined set of behaviours added to it. You can select between different behaviours by adding the following options as a data attribute.

  • data-ajax = "true"
    This option will load the link through AJAX, which is the default option. It will load the response into the appropriate element with the data-role="page" attribute. This means any CSS styling or  JavaScript in the <head> tag will not be loaded. jQuery's "ready" event will also not be triggered, since the page is not considered "refreshed". The jQuery Mobile specific event "pageload" is triggered, which you can find more information about here. Also, the page transition will perform the animation that we set as well.
  • data-ajax = "false"
    This option will load the link's entire response through a typical HTTP Request. The page is refreshed and jQuery's "ready" event is triggered. There is still an assumption that the link is leading to a page within the domain. With the AJAX option off, the animation will not be played during the page transition by default.
  • data-rel = "external"
    This option specifies that the link is pointing to a different domain and the link will not be appended to the current domain name. The AJAX is also turned off by default.

For example, if you are trying to link to another program, such as an existing WebSmart program you've created, you should add data-ajax="false" to your link tag!

Rate This Article

Did this example help you to achieve your goal?
 Yes  No  Don't Know

Enter additional comments below.   If you want to hear back from us, include your contact information.

Email Address:
Comments:
Please enable JavaScript in order to rate this page.