jquery - How to do a custom transition using Javascript -
jquery - How to do a custom transition using Javascript -
so developing site scratch (first time ever) , i've made general layout psd made , great, @ point want refine site bit javascript effects-functions.
when @ index page, have banner, sidebar , content (articles). when press articles goes article (obviously) want create custom loading page @ 0:22: https://www.youtube.com/watch?v=k1q6y_snurw#t=20
i've got create or find gif i've done that, how add together site?
the articles in class although guess have utilize id each specific article go respective article.
edit: pop in file , add together reference in every page has link:
class="lang-js prettyprint-override">function loadxmldoc(name) { var xmlhttp = new xmlhttprequest(); xmlhttp.addeventlistener("load", transfercomplete, false); xmlhttp.open("get", name, true); document.getelementbyid("loading").style.display = "block"; xmlhttp.send(); function transfercomplete() { document.write(xmlhttp.responsetext); history.replacestate(null, null, name); } } function ajaxcallback(e) { var e = window.e || e; var href = e.target.getattribute("href"); if (e.target.tagname !== 'a' || href[0] == "#" || href.substring(0, 11).touppercase() == "javascript:" || e.target.class == "noloadpage") return; e.preventdefault(); loadxmldoc(href); } if (document.addeventlistener) document.addeventlistener('click', ajaxcallback, false); else document.attachevent('onclick', ajaxcallback);
and show when next page loading (be sure add together id "loading") this:
<div id="loading" style="display:none">loading</div>
this makes every link isn't anchor(#id) or function(javascript:whatever) , doesn't have "noloadpage" class load ajax , show loading
div while loading.
javascript jquery html css ajax
Comments
Post a Comment