Software Archive
Read-only legacy content
17061 Discussions

less file not work every change page

Randy_S_1
Beginner
219 Views

intel xdk 3088 and jquery mobile.

i want to change the index.html page to second.html page by clicking buton. i hafe 3 file :

1.index.html

2.second.html

3. change .js

i using this code on index.html

div class="widget-container content-area vertical-col"><a class="widget uib_w_1 d-margins" data-uib="jquery_mobile/button" data-ver="0" data-role="button" id="chb" href="ra.html">Button</a>
                        <span class="uib_shim"></span>
                    </div>

in my chage.js i using this code

$(document).on("click", ".uib_w_5", function(evt) {
document.location = "second.html";
});

in emulator that work but if i clik the buton  the second.html come without less file, its come with standard desing ..how to fixt hat... please help me....

 

0 Kudos
2 Replies
Chris_P_Intel
Employee
219 Views

Look in to the jQueryMobile docs.

 

jQueryMobile has a special ajax page-loading feature. What it does is rather than going to another html file, JQM "loads" the DOM of that page in memory, and dynamically switches the content. In other words the head of the page is not loaded. 


You can read more about it here: https://demos.jquerymobile.com/1.2.0/docs/pages/page-links.html

If you don't want that behavior, read the "Linking Without Ajax" section of that page.  I'm not exactly sure how to defeat it with Javascript.

Hope this helps,

Chris

0 Kudos
Chris_P_Intel
Employee
219 Views

Also  https://demos.jquerymobile.com/1.2.0/docs/pages/page-scripting.html

0 Kudos
Reply