2011-07-19 14 views
5

hola Tengo botones de radio agrupados (se ven como los botones de jquery normales cuando se agrupan). y en lugar de texto, quiero que se muestre un ícono (o una imagen pequeña). ¿alguien podría enseñarme cómo puedo hacer esto en jquery mobile?ícono de botón de radio móvil de jquery

Respuesta

11

Ejemplo vivo:

Ejemplo:

<div data-role="page" id="radio-icons"> 
    <div data-role="content"> 
     <div data-role="fieldcontain"> 
      <fieldset data-role="controlgroup"> 
       <legend>Choose a pet:</legend> 
        <input type="radio" name="radio-choice-1" id="radio-choice-1" value="choice-1" checked="checked" /> 
       <label for="radio-choice-1"><img src="http://cdn2.iconfinder.com/data/icons/Snow/Snow/snow/Cat.png" /></label> 

        <input type="radio" name="radio-choice-1" id="radio-choice-2" value="choice-2" /> 
       <label for="radio-choice-2"><img src="http://images.findicons.com/files/icons/8/dog/48/48_dog4.png" /></label> 

        <input type="radio" name="radio-choice-1" id="radio-choice-3" value="choice-3" /> 
       <label for="radio-choice-3"><img src="http://icon.downv.com/32x32/5/142/1070746.0048c51761d5b53e5a2297e458ba0ff7.gif" /></label> 

        <input type="radio" name="radio-choice-1" id="radio-choice-4" value="choice-4" /> 
        <label for="radio-choice-4"><img src="http://cdn6.droidmill.com/media/market-media/com.tinyminds.android.widgets.lizardbattery_icon.png" /></label> 
      </fieldset> 
     </div> 
    </div> 
</div> 
+0

te amo hombre! esto funciona perfectamente! ¡Nunca pensé que fuera tan fácil como esto! gracias de nuevo y mis mejores deseos! –

+0

np contenta de ayudar –

Cuestiones relacionadas