GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   smart javascript bastards ----> (https://gfy.com/showthread.php?t=890719)

Mutt 02-28-2009 06:07 AM

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? :helpme

who 02-28-2009 06:16 AM

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

ScriptWorkz 02-28-2009 06:17 AM

Quote:

Originally Posted by Mutt (Post 15561936)
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? :helpme

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

Mutt 02-28-2009 06:17 AM

Quote:

Originally Posted by who (Post 15561948)
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

Mutt 02-28-2009 06:18 AM

Quote:

Originally Posted by ScriptWorkz (Post 15561949)
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?

fallenmuffin 02-28-2009 06:20 AM

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>

Mutt 02-28-2009 06:24 AM

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

thanks!

who 02-28-2009 06:27 AM

Quote:

Originally Posted by Mutt (Post 15561961)
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! :thumbsup


All times are GMT -7. The time now is 12:52 AM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123