how to get value attribute of spinbox input for jquery mobile
===

This is a basic jQuery question - 
I'm using the spinbox plugin, here:

http://dev.jtsage.com/jQM-Spinbox/


    <div data-role="fieldcontain">
    <label for="spin">Input spinner</label>
    <input data-role="spinbox" name="spin" id="spin" value="50" min="0" max="100" />
    </div>

updated value is shown when clicking + or -,

but using this call...

    $(this).replaceWith("<div>"+ $("#spin").val +"</div>" );


..returns garbage (code). I want to replace some element with the value of the spinbox.

    $(this).replaceWith("<div>"+ $("#spin").value +"</div>" );
returns "undefined"

I'm assuming that the widget should make it this easy. Any help will be appreciated


Thanks in advance