jquery permanently alter html
<p>How would I go about permanently add a class to a html element using jQuery.</p>

<p>I am planning on building a image gallery that is sorted into types/categories using the <a href="http://www.jscodes.com/jquery-sorting-product-pictures/" rel="nofollow">jQuery sorting plugin</a>. I want to add a dropdown box below each image that allows the user to change the type (add/remove class) which permanently changes the HTML for next load. How would I go about this?</p>

<p>EDIT: Ok so from what I can put together I should use this approach:</p>

<ol>
<li>Jquery add/removes class.</li>
<li>Send full HTML of source via AJAX request.</li>
<li>PHP writes full HTML to file or is there a way to replace only a particular part of a file in PHP?</li>
</ol>
