Home Forums Porto Admin Template Doubt with radio

This topic contains 1 reply, has 2 voices, and was last updated by  Support2 1 year, 5 months ago. This post has been viewed 393 times

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • #10018249


    Hello, i tried show two radios, and one of them load selected. I can with “cheched” attribute, but when change radio options, the attribute dont change, and when i tried get option selected, JQuery return always de default becouse de CSS only change label class.
    Can i solve this? Thanks!




    1) To show radio checked when the page load you are right using the attribute checked. Like this code below where the second radio loads checked:

    <div class="radio">
    		<input type="radio" name="optionsRadios" id="optionsRadios1" value="option1">
    		Option one is this and that—be sure to include why it's great
    <div class="radio">
    		<input type="radio" name="optionsRadios" id="optionsRadios2" value="option2" checked>
    		Option two can be something else and selecting it will deselect option one

    2) To return the value of radio checked with javascript/jQuery you can do some like this below:

    $(document).on('change', 'input[name="optionsRadios"]', function(){
    	}, 1000);

    Please try that and let me know if you need further assistance.

    Kind Regards,


Viewing 2 posts - 1 through 2 (of 2 total)