Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Aki 43 posts 214 karma points
    Oct 11, 2015 @ 00:06
    Aki
    0

    is Umbraco7 preserving Javascript code across pages?

    hi im struggling with Jquery mobile in Umbraco 7

    Making slides are easy with Jquery Mobile.. but my problem is that for some reason something is persistant. (what i do not know)

    so when i return to the page with the widget slide it duplicates the slider (it builds the slider twice and again)

    I have used the time to make sure all the Jquery and Jquery mobile are up to date and that the server have no errors..

    one thing i noticed that console.. is persistence across pages and i asume that is the source of the error ...

    Any help would be appreciated..

    Aki

    Ps if i make a HTML page on my pc it works

  • Aki 43 posts 214 karma points
    Oct 11, 2015 @ 00:13
    Aki
    0

    Update apperently it is..

    her is my code.. How can i fix this ??

    <script type="text/javascript">
            var i; 
            if(i != null){
                i += i;
            }else{
                i= 0;
            }
    $( document ).ready(function() {
        console.log( "ready!" +i );
        i+=1;
    });
    

    Output:

    ready!0
    jquery-2.1.4.js:8561 Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user's experience. For more help, check http://xhr.spec.whatwg.org/.
    VM11679:3 XHR Loaded (mobil-abonomenter - 200 OK - 47.053000002051704ms - 1.65KB)
    VM11684:3 XHR Loaded (jquery-2.1.4.js - 200 OK - 106.60499999357853ms - 74.454KB)
    VM11688:3 XHR Loaded (bootstrap.js - 200 OK - 40.89200000453275ms - 14.457KB)
    VM11676:8 ready!2
    VM11703:3 XHR Loaded (jquery.mobile-1.4.5.min.js - 200 OK - 90.95000001252629ms - 55.928KB)
    VM11717:3 XHR Loaded (mobil-abonomenter - 200 OK - 37.82100000535138ms - 1.65KB)
    VM11721:3 XHR Loaded (jquery-2.1.4.js - 200 OK - 86.01400000043213ms - 74.454KB)
    VM11725:3 XHR Loaded (bootstrap.js - 200 OK - 37.76000000652857ms - 14.457KB)
    VM11716:8 ready!6
    VM11729:3 XHR Loaded (jquery.mobile-1.4.5.min.js - 200 OK - 78.8170000014361ms - 55.928KB)
    VM11742:3 XHR Loaded (mobil-abonomenter - 200 OK - 36.334000003989786ms - 1.65KB)
    VM11746:3 XHR Loaded (jquery-2.1.4.js - 200 OK - 84.98300000792369ms - 74.454KB)
    VM11750:3 XHR Loaded (bootstrap.js - 200 OK - 39.252000002306886ms - 14.457KB)
    VM11741:8 ready!14
    VM11754:3 XHR Loaded (jquery.mobile-1.4.5.min.js - 200 OK - 64.44799999007955ms - 55.928KB)
    VM11767:3 XHR Loaded (mobil-abonomenter - 200 OK - 37.1679999952903ms - 1.65KB)
    VM11771:3 XHR Loaded (jquery-2.1.4.js - 200 OK - 83.34099999046884ms - 74.454KB)
    VM11775:3 XHR Loaded (bootstrap.js - 200 OK - 40.801999988616444ms - 14.457KB)
    VM11766:8 ready!30
    VM11780:3 XHR Loaded (jquery.mobile-1.4.5.min.js - 200 OK - 64.44799999007955ms - 55.928KB)
    VM11792:3 XHR Loaded (mobil-abonomenter - 200 OK - 38.08800000115298ms - 1.65KB)
    VM11796:3 XHR Loaded (jquery-2.1.4.js - 200 OK - 67.16700000106357ms - 74.454KB)
    VM11800:3 XHR Loaded (bootstrap.js - 200 OK - 38.906000001588836ms - 14.457KB)
    VM11791:8 ready!62
    VM11804:3 XHR Loaded (jquery.mobile-1.4.5.min.js - 200 OK - 64.53300001157913ms - 55.928KB)
    
  • Robert Foster 459 posts 1820 karma points MVP 3x admin c-trib
    Oct 11, 2015 @ 04:13
    Robert Foster
    0

    Hi Aki, It's highly unlikely that Umbraco is doing this; although jQuery.Mobile may be - your code example doesn't really have enough information or context to be sure of what's going on though.

  • Aki 43 posts 214 karma points
    Oct 11, 2015 @ 06:56
    Aki
    0

    Hi Robert Foster your right its JQuery mobile....

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies