How to add .html JQuery before element

r3alhaxx0r

New Member
I'm quite new with JQ thing, so I do not understand why \[code\].html\[/code\] works, and \[code\].before\[/code\] does not but I hope someone will help. I'm using it within some old ASP project, so this code is within \[code\].ascx\[/code\] file. I use this line:\[code\]$('#UploadSummaryFile1').html($(this).val()+'<span id="DeleteCrossFile1" onclick="DeleteElement(1);"><img src="http://stackoverflow.com/questions/14066856/Images/DeleteCross.png" alt="Delete"></span>');\[/code\]And it works fine, I get image after the "UploadSummaryFile1" container. So I have on the screen |FilenameX|, and I need to have |X Filename|.I tried changing \[code\].html\[/code\] to \[code\].before\[/code\] but apparently that's not the way how to use it.
 
Back
Top