Reputation: 4212
Im trying to append an img right after a piece of text. Im using 'embedly' to load news items, so I have to perform on window load. Its really simple: JsFiddle
I cant figure out why its not working. I have tried many combinations and events(after,Insert etc) nothing seems to work.
Upvotes: 1
Views: 326
Reputation: 160833
You should use .after
method.
$('.embed').find('.description').after('<img src="http://latitudes.nu/wp-content/themes/theme-framework/framework/media/images/comment_icon.gif" style="width:14px; height:14px; border:none;" />');
But, use setTimeout
is not a good idea, you should set the callback option as the plugin provide.
Upvotes: 1