Monday, 11 February 2019

MVC Material design check box not showing

///////////////////////////// HTML

                    /////////// CSS
  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/3.0.3/normalize.css" />

    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.96.1/css/materialize.min.css" />

<from>
          <p>
                <input type="checkbox" id="test6" />
          </p>
         
            <p>
                <input type="checkbox" id="test6" />
                <input name="test5" type="hidden" value="false">
                <label for="test6">Test</label>

            </p>
</from>



/////////////////////////JS

             <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.0.0/jquery.js"></script>    

      <script src="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.96.1/js/materialize.min.js"></script>

<script>

          $(document).ready(function () {
              $('input[type=checkbox]').each(function () {
                  if (this.nextSibling.nodeName != 'label') {
                      $(this).after('<label for="' + this.id + '" style</label>')
                  }
              })
          })

      </script>




//////////////// Result




No comments:

Post a Comment

How to highlight selected text in notepad++

  –> To highlight a block of code in Notepad++, please do the following steps step-1  :- Select the required text. step-2  :- Right click...