View Single Post
Old 10-08-2012, 03:39 AM   PM User | #2
DanInMa
Senior Coder

 
DanInMa's Avatar
 
Join Date: Nov 2010
Location: Salem,Ma
Posts: 1,336
Thanks: 13
Thanked 207 Times in 207 Posts
DanInMa is on a distinguished road
Code:
var stored_html = "";

$(".main > div").each(function() {

	$(this).insertAfter(stored_html);

});

$(stored_html).insertAfter($(this).parent())
what do you intend for it to do exactly? the last line does nothing because you havent assigned it to an element, so using $(this).parent() does nothing, as it has no parent to reference.

the first part, well all you are doing is inserting, literally, nothing, not event a blank space.
__________________
- Firebug is a web developers best friend! - Learn it, Love it, use it!
- Validate your code! - JQ/JS troubleshooting
- Using jQuery with Other Libraries - Jslint for Jquery/other JS library users
DanInMa is offline   Reply With Quote