I have the following form on my website
input a
input b
input c
Is it possible to have the following done using jQuery?
input a
input c
input b
Keep in mind that the form still needs to collect the data correctly.
Please advise.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Yes, that’s possible, it’s easier, albeit the same technique, with
ids but if you just know which one you want to move, then:JS Fiddle demo
JS Fiddle of
id-based approach (generously offered by Vega).Or, similarly:
JS Fiddle demo.
JS Fiddle demo of
id-based approach.References:
appendTo().insertAfter().:nth-child()selector.:textselector.