Thanks for the tip, that works :D. However it seems rather roundabout
to create new img-elements when the elements i grab are img-elements.
I have continued to experiment and this works too:
var img = $(".gallery img");
$(".gallery").remove();
$(img).each(function() {
$("#bild_spel div ul").append($(this));
});
$("#bild_spel div ul img").wrap('<li></li>');
If I do it like this I don't really need the each-function so I might
as well write
var img = $(".gallery img");
$("#bild_spel div ul").append(img);
$("#bild_spel div ul img").wrap('<li></li>');
But I would like to wrap the img-elements before inserting them again
but that doesn't seem to work.
Does wrap only work on elements that are actually displayed on the
page?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"jQuery Development" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/jquery-dev?hl=en
-~----------~----~----~----~------~----~------~--~---