kolejny problem.
Używam pluginy do jQuery:
1. history http://www.mikage.to/jquery/jquery_history_xhtml.html#aao
2. imgbox http://jqueryglobe.com/article/imgbox
Gdy użyję tylko imgbox'a działa bez zarzutów, gdy użyję tylko history też działa ok, natomiast jeżeli probuję wykorzystać oba pluginy, nie działa ani imgbox, ani history.
Wygląda to wszystko tak i działać nie chce w takiej konfiguracji
CODE
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3/jquery.min.js"></script>
<script type="text/javascript" src="imgbox/jquery.imgbox.pack.js"></script>
<link rel="stylesheet" href="imgbox/imgbox.css" />
<script type="text/javascript">
$(document).ready(function() {
$("a.galeria").imgbox();
});
</script>
<script type="text/javascript" src="js/jquery.history.js"></script>
<script type="text/javascript">
// PageLoad function
// This function is called when:
// 1. after calling $.historyInit();
// 2. after calling $.historyLoad();
// 3. after pushing "Go Back" button of a browser
function pageload(hash) {
if (!isNaN(hash)){
var url = "get.php?id="+ escape(hash) + "&language=<?php echo $language?>";
}
else {
if(hash!='szukaj'){
var url = "get.php?show_realizacje="+ escape(hash).replace('realizacja', '') + "&language=<?php echo $language?>";
}
else if (hash=='szukaj') {
var url = "get.php?search="+ document.forms[0].search.value +"&language=<?php echo $language?>";
}
}
if(hash) {
$("#tresc").load(url);
}
}
$(document).ready(function(){
// Initialize history plugin.
// The callback is called at once by present location.hash.
$.historyInit(pageload, "get.php?id=33&language=<?php echo $language?>");
// set onlick event for buttons
$("a[rel='menu']").click(function(){
//
var hash = this.href;
hash = hash.replace(/^.*#/, '');
// moves to a new page.
// pageload is called at once.
// hash don't contain "#", "?"
$.historyLoad(hash);
return false;
});
});
</script>
<script type="text/javascript" src="imgbox/jquery.imgbox.pack.js"></script>
<link rel="stylesheet" href="imgbox/imgbox.css" />
<script type="text/javascript">
$(document).ready(function() {
$("a.galeria").imgbox();
});
</script>
<script type="text/javascript" src="js/jquery.history.js"></script>
<script type="text/javascript">
// PageLoad function
// This function is called when:
// 1. after calling $.historyInit();
// 2. after calling $.historyLoad();
// 3. after pushing "Go Back" button of a browser
function pageload(hash) {
if (!isNaN(hash)){
var url = "get.php?id="+ escape(hash) + "&language=<?php echo $language?>";
}
else {
if(hash!='szukaj'){
var url = "get.php?show_realizacje="+ escape(hash).replace('realizacja', '') + "&language=<?php echo $language?>";
}
else if (hash=='szukaj') {
var url = "get.php?search="+ document.forms[0].search.value +"&language=<?php echo $language?>";
}
}
if(hash) {
$("#tresc").load(url);
}
}
$(document).ready(function(){
// Initialize history plugin.
// The callback is called at once by present location.hash.
$.historyInit(pageload, "get.php?id=33&language=<?php echo $language?>");
// set onlick event for buttons
$("a[rel='menu']").click(function(){
//
var hash = this.href;
hash = hash.replace(/^.*#/, '');
// moves to a new page.
// pageload is called at once.
// hash don't contain "#", "?"
$.historyLoad(hash);
return false;
});
});
</script>
Proszę o pomoc.