What is the connection between the page id and the data-url attribute? Is it OK to change the data-url attribute?
My point is that there is a page in which I am using the page using Param. I also specify the data-url in changepage. After going to that page, if I manually refresh the page then a new page is added because the data-url is different for that page. That is, the data-URL is similar to the page ID, hope to be clear on this. What should I do so that the page be changed during the page's manual refresh?
And, can someone please tell how JQ uses PageID and Data-URL? thank you in advanced.
You can solve this problem using one of the following methods: Use the code below to go to the second page with the DOM To remove the second page. In this way, when you are going to the first page, the second page will be removed from the DOM and your problem will be resolved. OR : Use: This creates a URL: ../car-details.html?id=my_val The URL resides on the same refresh so you can still get the parameter and OR Before data-url is used to track the page Element if the element is not explicitly set, all the pages embedded within the main application document have the same attribute code as
data-url page
data-url in a DOM. If he does not find such a page then it makes an Ajax request and loads a new page in the DOM.
$ (document) .on ('pagehide', '# second-page', function (event), UI) {$ (event.target) .remove ();});
$. Mobile.changePage ('car-details.html', {Data: {id: this.id}}); Without using the
dataUrl setting.
Data-url is similar to the page ID.
changePage () check whether the
data-url equals the second page ID The page with is present in the DOM and delete it manually.
if ($ ("# second-page-id"). Length> 0 & amp; $ ("# second-page-id"). Attr ("Data - Url ") === 'Second Page-ID') {console.log ('Remove from DOM'); . Deleting $ ("# Second Page-ID"); }
No comments:
Post a Comment