本帖最后由 w5951569 于 2013-08-05 11:59:37 编辑

解决方案 »

  1.   


    //点击小图切换大图
    $("#thumbnail li a").click(function(){
    //$(".zoompic img").hide().attr({ "src": $(this).attr("href")});
    //<!--大图 想在这里加<A>标签-->
    $(".zoompic img").hide().attr({ "src": $(this).attr("href")}).bind('click',function(){
    window.location.href=$(this).attr('title');
    });

    $("#thumbnail li.current").removeClass("current");
    $(this).parents("li").addClass("current");
    return false;
    });
      

  2.   

    这是把小图附上链接了吧?  我其实是要在上面大图那块加一个<a href=""><img....></a>标签  然后通过这段代码吧大图的这个href改了  不是改小图的href 小图的href是用来修改大图的路径来的  大图这就是一个初始的东西 
    <img src="{dede:global.cfg_templets_skin/}/images/pic/1.jpg" width="550" height="250" alt="美女配奥迪A4L墙纸" /></div><!--大图 想在这里加<A>标签-->
      

  3.   

    我哪段的意思是当大图的图片被点击时,window.location.href=小图的title属性中的值
      

  4.   

    额 我后来看了 貌似是这么个情况 但是这样子这个打开的链接全部都是首页....  我找了另外个大神给改了下
    他在大图前边加了个层
    <div id="show_img">
    <a id="bigimg" href="javascript:;"><img src="{dede:global.cfg_templets_skin/}/images/pic/1.jpg" width="550" height="250" alt="美女配奥迪A4L墙纸" /></a>
    </div>
    然后把下边点击小图换大图这块改了
    $("#thumbnail li a").click(function(){
    //$("#show_img").hide();
        
        var mysrc=($(this).children('img').attr("src"));
        $(".zoompic a").attr('href',$(this).attr("title"));
    $(".zoompic img").attr({ "src": mysrc});
    $("#thumbnail li.current").removeClass("current");
    $(this).parents("li").addClass("current");
    return false;
    });