tags:

views:

18

answers:

1

Hi I'm trying to get this

$( "<div class=\"images\ style=\"background:url('" + item.link + "')no-repeat top center;\"/>").appendTo("#images").wrap("<a target=\"_blank\ href='" + item.link + "'></a>");

to output correctly but I'm not very hot on concatenating javascript strings. It's the line background div I can't get right.

cheers

Andy

A: 

Try

$( "<div class='images' style='background:url(" + item.link + ")no-repeat top center;'/>").appendTo("#images").wrap("<a target='_blank' href=" + item.link + "></a>");
rahul