javascript - Clickable list item that select a radio -


I have this html ... when I click on the Li item, I want the radio input to toggle Know that you can wrap the whole thing in a label but I can not change the HTML (JS and CSS only).

Any thoughts?

  & lt; Li & gt; & Lt; Input type = "radio" name = "KETELWIZARD_TYPE_WONING" data-label = "app" value = "Appartement | Appartement" & gt; Appartement & lt; Span class = "image" & gt; & Lt; Img src = "https://acceptatie.foursites.nl/feenstra-ketelkiezer/wp-content/uploads/appartement.png" height = "24" width = "23" alt = "" & gt; & Lt; / Span & gt; & Lt; / li & gt;    

If you want to click anywhere on the screen to check the radio : <(": Radio"). Prop ('check', true);});

If you want to toggle it (I think you might want to):

  $ ("li "). (Function () (var $ radio = $ (this). Find (": radio") $ radio.prop ('checked',! $ Radio.prop ('checked'));});    

Comments

Popular posts from this blog

php - PDO bindParam() fatal error -

logging - How can I log both the Request.InputStream and Response.OutputStream traffic in my ASP.NET MVC3 Application for specific Actions? -

java - Why my included JSP file won't get processed correctly? -