3 Replies Latest reply on Jul 30, 2014 9:18 AM by joel_pau

    I need to do THIS

    Alberto_x137

      Hi all!!

       

      I need your help again. It's simple, I need to do what you see in the picture (I don't know how to say that s**t in english, sorry). One button like that you have to mark to be able to press the submit button

       

      Captura de pantalla 2014-07-30 a las 03.10.20.png

       

      If you have an example i will be eternally grateful.

       

      Thank you so much

        • 1. Re: I need to do THIS
          joel_pau Level 5

          Hi,

           

          You can begin using this code.

          sym.$( '<form><input type="checkbox">I have read and agree with the above terms and conditions</form>' ).appendTo( sym.$("Rectangle") );

          sym.$( ":checkbox" ).change( function() { console.log(event.type); } );


          :checkbox Selector | jQuery API Documentation

           

          This code also runs:

          sym.$( "input[type='checkbox']" ).change( function() { console.log(event.type); } );

          1 person found this helpful
          • 2. Re: I need to do THIS
            Alberto_x137 Level 1

            Thank you so much!! That code was perfect... exactly what i was searching

             

             

            A small detail, when you click the checkbox to bring forward the submit button I use the following code: sym.$("symbolname").css("z-index", "100"); and it's OK, but I also need when someone press again on the checkbox, disable the submit button again. Can you help me?



            Thank you very much again.

            • 3. Re: Re: I need to do THIS
              joel_pau Level 5

              You can try this code:

              sym.$( ":checkbox" ).change(

                function(){ $(this).parent().css("color","red").html("Thank you for sign in!"); }

              );

               

              The checkbox is removed.