Modifs pour faire marcher les galeries
This commit is contained in:
@ -1,9 +1,10 @@
|
||||
/**
|
||||
* Galleria History Plugin 2012-04-04
|
||||
* Galleria History Plugin 2016-09-03
|
||||
* http://galleria.io
|
||||
*
|
||||
* Copyright (c) 2010 - 2016 worse is better UG
|
||||
* Licensed under the MIT license
|
||||
* https://raw.github.com/aino/galleria/master/LICENSE
|
||||
* https://raw.github.com/worseisbetter/galleria/master/LICENSE
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -1 +1 @@
|
||||
!function(n,e){Galleria.requires(1.25,"The History Plugin requires Galleria version 1.2.5 or later.");Galleria.History=function(){var i=[],t=false,a=e.location,o=e.document,r=Galleria.IE,s="onhashchange"in e&&(o.mode===undefined||o.mode>7),u,c=function(n){if(u&&!s&&Galleria.IE){n=n||u.location}else{n=a}return parseInt(n.hash.substr(2),10)},f=c(a),l=[],h=function(){n.each(l,function(n,i){i.call(e,c())})},d=function(){n.each(i,function(n,e){e()});t=true},y=function(n){return"/"+n};if(s&&r<8){s=false}if(!s){n(function(){var i=e.setInterval(function(){var n=c();if(!isNaN(n)&&n!=f){f=n;a.hash=y(n);h()}},50);if(r){n('<iframe tabindex="-1" title="empty">').hide().attr("src","about:blank").one("load",function(){u=this.contentWindow;d()}).insertAfter(o.body)}else{d()}})}else{d()}return{change:function(n){l.push(n);if(s){e.onhashchange=h}},set:function(n){if(isNaN(n)){return}if(!s&&r){this.ready(function(){var e=u.document;e.open();e.close();u.location.hash=y(n)})}a.hash=y(n)},ready:function(n){if(!t){i.push(n)}else{n()}}}}()}(jQuery,this);
|
||||
(function($,window){Galleria.requires(1.25,"The History Plugin requires Galleria version 1.2.5 or later.");Galleria.History=function(){var onloads=[],init=false,loc=window.location,doc=window.document,ie=Galleria.IE,support="onhashchange"in window&&(doc.mode===undefined||doc.mode>7),iframe,get=function(winloc){if(iframe&&!support&&Galleria.IE){winloc=winloc||iframe.location}else{winloc=loc}return parseInt(winloc.hash.substr(2),10)},saved=get(loc),callbacks=[],onchange=function(){$.each(callbacks,function(i,fn){fn.call(window,get())})},ready=function(){$.each(onloads,function(i,fn){fn()});init=true},setHash=function(val){return"/"+val};if(support&&ie<8){support=false}if(!support){$(function(){var interval=window.setInterval(function(){var hash=get();if(!isNaN(hash)&&hash!=saved){saved=hash;loc.hash=setHash(hash);onchange()}},50);if(ie){$('<iframe tabindex="-1" title="empty">').hide().attr("src","about:blank").one("load",function(){iframe=this.contentWindow;ready()}).insertAfter(doc.body)}else{ready()}})}else{ready()}return{change:function(fn){callbacks.push(fn);if(support){window.onhashchange=onchange}},set:function(val){if(isNaN(val)){return}if(!support&&ie){this.ready(function(){var idoc=iframe.document;idoc.open();idoc.close();iframe.location.hash=setHash(val)})}loc.hash=setHash(val)},ready:function(fn){if(!init){onloads.push(fn)}else{fn()}}}}()})(jQuery,this);
|
@ -23,7 +23,7 @@
|
||||
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.js"></script>
|
||||
|
||||
<!-- load Galleria -->
|
||||
<script src="../../galleria-1.4.2.min.js"></script>
|
||||
<script src="../../galleria-1.4.7.min.js"></script>
|
||||
|
||||
<!-- load the History plugin, no need for further scripting -->
|
||||
<script src="galleria.history.min.js"></script>
|
||||
@ -84,17 +84,17 @@
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<p class="cred">Made by <a href="http://galleria.aino.se">Galleria</a>.</p>
|
||||
<p class="cred">Made by <a href="http://galleria.io">Galleria</a>.</p>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
$(function() {
|
||||
// Load the classic theme
|
||||
Galleria.loadTheme('../../themes/classic/galleria.classic.min.js');
|
||||
|
||||
// Load the classic theme
|
||||
Galleria.loadTheme('../../themes/classic/galleria.classic.min.js');
|
||||
|
||||
// Initialize Galleria
|
||||
Galleria.run('#galleria');
|
||||
|
||||
// Initialize Galleria
|
||||
Galleria.run('#galleria');
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
Reference in New Issue
Block a user