jquery
$(function(){
$('#4').click(function() {
$('<input name="if4" type="text" value="other price>"').appendTo('form');
});
});
html
<form>
< input name="name" type="text" value="Enter your name" /><br />
< input name="contacts" type="text" value="Contact info" /><br />
< select name="services">
< option value="1">1</option>
< option value="2">2</option>
< option value="3">3</option>
< option id="4" value="Other">4</option>
< /select><br />
< textarea name="description">Description</textarea><br />
< /form>
What i want to do:
When i press on option value nr 4, there appears is new input field, this thing works fine.
But how can I to change order where input field gonna appear, because now it appears after textfield, how can i put it after ?
Thank you