开发者

how to change html image src by j-query

view.aspx

<img src ="~/UserControls/Vote/Images/Arrow Up.png" id = "voteupoff" 
            runat = "server" alt ="vote up" 
    class="voteupImage" style="height: 45px; width: 45px"/>

i wnat to change it src ~/UserControls/Vote/Images/aftervoteupArrowUp.png when click on image i means

view.js

    $('img.voteupImage').live('click', function() {

 $('img.voteupImag开发者_如何学JAVAe').attr('src', aftervoteUp);
     }
but it's not working..


$('img.voteupImage').live('click', function() {
    $(this).attr('src', aftervoteUp);
});
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜