-1

there are two images in my page for those am using only one imagebutton and showing as per the startup functionality.

Now i want to have a clickable link one image and for other it should not be clickable.

Example

 if(userselection == chocolate)
 userselimg.imageurl="~/chocolate.jpg"
 if(userselection == coffee)
 userselimg.imageurl="~/coffee.jpg"

and i want add a link this is not a link to 2nd option i.e coffee and no link for chocolate. Here i am one imagebutton for both conditions.

kindly advice me

4

1 回答 1

0

单击第一张图片并转到链接:

$("#img1").click(function(){
     var url = 'https://www.google.co.in/';
     $(location).attr('href', url);
}); 

要取消绑定第二张图片的点击,请使用unbind

于 2013-10-08T06:14:18.183 回答