0

I am trying to bind the anchor tag link to my source.

Actual need is I am having XML attributes such as <btnVal> and <Link>,

Here Button Val holds the value of Learn More that be displayed to us and link is the href on click where the link should go.

But there am facing a problem in binding this both to the same id.

This is what I have tried.

http://jsfiddle.net/QNZDX/7/

I need some help.

4

1 に答える 1

0

Just some minor issues text() and #but_val:

var link = $xmldata.find("images").find("image:eq(" + prevIndex + ")").find("link").text();
$("#but_val").attr('href', link ).fadeIn("slow");

jsFiddle Here

于 2012-08-30T12:18:07.823 に答える