Сообщение от danik.js
|
Deff, задача то совершенно другая. Нужно чтоб старый код для hs работал с fancybox.
|
<!DOCTYPE html>
<html>
<head>
<title></title>
<link rel="stylesheet" href="http://fancyapps.com/fancybox/source/jquery.fancybox.css?v=2.1.4" type="text/css" media="screen" />
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script type="text/javascript" src="http://fancyapps.com/fancybox/source/jquery.fancybox.pack.js?v=2.1.4"></script>
<script>
$(document).ready(function(){
$("p.fotoline").find("img").each(function(){
var href=$(this).attr('onclick').toString().replace(/^[\s\S]*?src:'([\s\S]*?)'[\s\S]*$/img,'$1');
$(this).removeAttr("class").wrap('<a rel="group1" class="gallery" href="'+href+'"></a>')
$(this).parent().html($(this).parent().html().replace(/onclick=".*?"/i,''));
});
});
</script>
<script type="text/javascript">
$(document).ready(function() {
$("a.gallery").fancybox();
});
</script>
</head>
<body>
<p class="fotoline">
<img class="highslide" onclick="try{hs.expand(this,{src:'/d/163953/d/hurgada-.jpg'});}catch(e){}" src="/d/163953/d/180489406_5.jpg" width="180" height="120" alt="Хургада " border="0">
<img class="highslide" onclick="try{hs.expand(this,{src:'http://www.holydieexplorer.com/wp-content/uploads/2011/07/pyramids-cairo-egypt-1600-1024x768.jpg'});}catch(e){}" src="https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQm0lSr3gjMZ12XQh6m8_6S2kfOEU2ryue9XLfByz3XIFuj-mMmcqjcXcyv" width="180" height="135" alt="3170138978_07448bfbdf_o" border="0">
<img class="highslide" onclick="try{hs.expand(this,{src:'/d/163953/d/egipet_1600.jpg'});}catch(e){}" src="/d/163953/d/109448406_5.jpg" width="180" height="135" alt="egipet_1600" border="0">
<img class="highslide" onclick="try{hs.expand(this,{src:'/d/163953/d/180489006_7.jpg'});}catch(e){}" src="/d/163953/d/180489006_5.jpg" width="180" height="135" alt="4064" border="0">
<img class="highslide" onclick="try{hs.expand(this,{src:'/d/163953/d/81.jpg'});}catch(e){}" src="/d/163953/d/109447006_5.jpg" width="180" height="135" alt="81" border="0">
</p>
</body>
</html>