smart javascript bastards ---->

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Mutt
    Too lazy to set a custom title
    • Sep 2002
    • 34431

    #1

    smart javascript bastards ---->

    i'm trying to use this script here, it's a jquery thing that pretties up forms http://www.no-margin-for-errors.com/...ttyCheckboxes/

    so i follow the instructions which say to include the jquery and prettycheckboxes js files in the head section

    then it says:

    Then you need to initalize prettyCheckboxes.


    Code:
    $(document).ready(function(){
    	$('input[type=checkbox],input[type=radio]').prettyCheckboxes();
    });
    i looked at the source of the demo page, that code isn't in there. i looked in the js file, prettycheckboxes - not there. where do i put it?
    I moved my sites to Vacares Hosting. I've saved money, my hair is thicker, lost some weight too! Thanks Sly!
  • who
    So Fucking Banned
    • Aug 2003
    • 19593

    #2
    Put the left leg in, put the right leg out, put the right leg in, and shake it all about.

    Comment

    • ScriptWorkz
      Confirmed User
      • Jul 2007
      • 274

      #3
      Originally posted by Mutt
      i'm trying to use this script here, it's a jquery thing that pretties up forms http://www.no-margin-for-errors.com/...ttyCheckboxes/

      so i follow the instructions which say to include the jquery and prettycheckboxes js files in the head section

      then it says:

      Then you need to initalize prettyCheckboxes.


      Code:
      $(document).ready(function(){
      	$('input[type=checkbox],input[type=radio]').prettyCheckboxes();
      });
      i looked at the source of the demo page, that code isn't in there. i looked in the js file, prettycheckboxes - not there. where do i put it?
      you can put it in your head tag between some script tags, or in it's own js file and include it with a script tag...

      Code:
      <script type='text/javascript'>
      <!--
      $(document).ready(function(){
      	$('input[type=checkbox],input[type=radio]').prettyCheckboxes();
      });
      //-->
      </script>
      Code:
      <script type='text/javascript' src='/path/to/file.js'></script>
      also, i think $('input[type=checkbox],input[type=radio]').prettyCheckboxes(); should be $('input[@type=checkbox],input[@type=radio]').prettyCheckboxes(); if it's not too early and i'm mistaken
      Last edited by ScriptWorkz; 02-28-2009, 04:18 AM.

      Comment

      • Mutt
        Too lazy to set a custom title
        • Sep 2002
        • 34431

        #4
        Originally posted by who
        Put the left leg in, put the right leg out, put the right leg in, and shake it all about.
        i asked for smart bastards not old bastards
        I moved my sites to Vacares Hosting. I've saved money, my hair is thicker, lost some weight too! Thanks Sly!

        Comment

        • Mutt
          Too lazy to set a custom title
          • Sep 2002
          • 34431

          #5
          Originally posted by ScriptWorkz
          you can put it in your head tag between some script tags, or in it's own js file and include it with a script tag...

          Code:
          <script type='text/javascript'>
          <!--
          $(document).ready(function(){
          	$('input[type=checkbox],input[type=radio]').prettyCheckboxes();
          });
          //-->
          </script>
          Code:
          <script type='text/javascript' src='/path/to/file.js'></script>
          ok thanks BUT why in the source of the demo page can't i find that initialization code?
          I moved my sites to Vacares Hosting. I've saved money, my hair is thicker, lost some weight too! Thanks Sly!

          Comment

          • fallenmuffin
            Confirmed User
            • Nov 2005
            • 8170

            #6
            he has it on that page... its at the bottom before his tracking code ;)

            <script type="text/javascript" charset="utf-8">
            $(document).ready(function(){
            $('#checkboxDemo input[type=checkbox],#radioDemo input[type=radio]').prettyCheckboxes();
            $('.inlineRadios input[type=radio]').prettyCheckboxes({'display':'inline'});
            });
            </script>

            Comment

            • Mutt
              Too lazy to set a custom title
              • Sep 2002
              • 34431

              #7
              arghhhhhh - i need sleep - i didn't see it down there.

              thanks!
              I moved my sites to Vacares Hosting. I've saved money, my hair is thicker, lost some weight too! Thanks Sly!

              Comment

              • who
                So Fucking Banned
                • Aug 2003
                • 19593

                #8
                Originally posted by Mutt
                arghhhhhh - i need sleep - i didn't see it down there.

                thanks!
                I hope the hokey pokey will cheer you up. Look I'll hold you hand and let's do it together!

                Comment

                Working...