Logical changes made to html editing through jquery