user171717
user171717

Reputation: 13

Change a text element to image in Jquery

How can I change the text "Previous" to an image element?

href:"#",title:"Previous",text:"Previous"}).appendTo(n);

Basically it is a image slider and these are the navigation text elements "Previous" and "Next"

http://i58.tinypic.com/2502jvn.png

Upvotes: 0

Views: 75

Answers (1)

Barmar
Barmar

Reputation: 782785

I'm guessing on what got lost in the copying. Here's what I think you need:

$('<a>', {  href: "#",
            title: "Previous"
            html: '<img alt="Previous", src="/images/previous.jpg">' }).appendTo(n);

Upvotes: 2

Related Questions