Question

I am wondering if its possible to use a selector of an input field with no class... I do have quite a few options to use below is a psudo type command that I would like to accomplish.

Type of Command:

$("input[type=radio]").prepend("<br/>");

Current HTML:

<input type="radio">SelectME

Result Required:

<input type="radio">SelectME<BR/>

OR

<BR/><input type="radio">SelectME

Note: This document is acctually being loaded from another script, so the tag that I want to munipulate is inside a dynamically loaded object.

thats all that shows up in php file aside from the script to load it in the head. The input box is loaded within the IDX div, so I am having problems putting that BR in for mobile users...

Was it helpful?

Solution

Keep track of those quotes :

$('input[type="radio"]')

and you can't append or prepend to an input, it's self closing.

$('input[type="radio"]').before('<br />')
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top