jQuery Color Picker: Farbtastic

Demonya bisa dilihat disini
Cara membuatnya :

1. Login blogger
2. Rancangan, Edit Html
3. Cari kode ]]></b:skin>

Dan Simpan kode berikut diatasnya :



 


/* ---------------
jQuery Color Picker: Farbtastic
---------------------------------- */
/**
* Farbtastic Color Picker 1.2
* © 2008 Steven Wittens
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
.farbtastic {
position: relative;
}
.farbtastic * {
position: absolute;
cursor: crosshair;
}
.farbtastic, .farbtastic .wheel {
width: 195px;
height: 195px;
}
.farbtastic .color, .farbtastic .overlay {
top: 47px;
left: 47px;
width: 101px;
height: 101px;
}
.farbtastic .wheel {
background: url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgjXJS8IwErOmv4ADFzgn1ykq8Oq78WSjcZAXveMxNgMkrRkXsEmqAU52Yj_8j1zzFGiFE5tkSzsd9wShA_K8g6E2y2A6ryq6ayepX0y9A1Fb8qwTuEiC8v6wifmQiVLkfFlDpGXBGbZGg/s1600/wheel.png) no-repeat;
width: 195px;
height: 195px;
}
.farbtastic .overlay {
background: url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh5qxUz4KmotnaH1tvtNpPMGmcTfPk1XchzzyWI3EdG5K897gf7mcDdF0wzgAf-xWHB_ySDG1Kf9CU2a61CQQ56VYJvoO7Azm-UhfHtA1u1cp_3dGkqqRPJNAE1b_x3c5qniNSP7RaMsdQ/s1600/mask.png) no-repeat;
}
.farbtastic .marker {
width: 17px;
height: 17px;
margin: -8px 0 0 -8px;
overflow: hidden;
background: url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj8VcHbGD6Hu5lfxJCMvYlUJH43rVJgCnBoZyu6ZEei37WTie4Y0oCmcr7OCanGi7WtimW7cFQeEKR9HDRVsop6x0RehLs4e3kGGG6jXWsD-YEbMIMtFZUWAD4F-WQKNLkzKHai_EABWss/s1600/marker.png) no-repeat;
}

selanjutnya simpan script berikut tepat diatas kode </head>

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
<script type="text/javascript" src="http://kangdadang.googlecode.com/files/farbtastic.js"></script>
<link rel="stylesheet" href="farbtastic.css" type="text/css" />
<script type="text/javascript" charset="utf-8">
$(document).ready(function() {
$('#demo').hide();
$('#picker').farbtastic('#color');
});
</script>

dan yang terakhir cara pemanggilannya pada Html :

<div id="demo" style="color: red; font-size: 1.4em;">
jQuery.js is not present. You must install jQuery in this folder for the demo to work.</div>

<form action="" style="width: 400px;">
<div class="form-item">
<label for="color">Color:</label><input id="color" name="color" type="text" value="#123456" /></div>
<div id="picker">
</div>
</form>

selesai.....

Related

Jquery 7873499327587937134

Post a Comment

emo-but-icon

Follow Us

Hot in week

Recent

Comments

Side Ads

Text Widget

Connect Us

item