Home » » JQuery Color Picker Farbtastic

JQuery Color Picker Farbtastic


    Cara membuatnya :
  1. Login blogger
  2. Rancangan, Edit Html, Cari kode ]]></b:skin>
  3. 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/AVvXsEjTy7Jx2CVQG0u51JOjEu20mwg4mrGREf2dS-UhHOjIZJnYPrSUp43eb7OxwlYLp4lxCkm-9yFrFi5rP3AZt83isADiF2JlRnHkId2CyUgcFpX1iVwvZxeWRNfAxk3Ek5r7LXBW3vJVQ-Y/s1600/wheel.png) no-repeat;
  width: 195px;
  height: 195px;
}
.farbtastic .overlay {
  background: url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgT0GJ2ie-HMYcfGX3icTG8rBfwrcNBR-DR7LlmrlF2yKTvu5T11mGLVEkACGlPMhQMQalATl8imARnp5flB44fM9xOsj1UXTr-vlkJ_9aWSaqy-CB5oYC5hoKK-Xpt5A0JBs3ak_4iby0/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/AVvXsEh4T3rxG1JVtSN4S0ZhWPA5lPZmpxh6zWMkQ0fs-1pmUmtv8ohNqdzqMKCimH3M5SnaoM2KKiwvMhyphenhyphenbRb2AauZfB6HB9vUUysOhJpouQfcaBSK1iiWVIVYVJtM9Ey4yaXMrowkfJ9F2qi4/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 pemasangan 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>


Sumber: Kang Dadang 
Share
Related Post

0 comments:

Archives

Label


ShoutMix chat widget
Guest Book
 

Subscribe Via Email

Enter your email address:

Delivered by FeedBurner

My Blog

Show

Exploration


Show

[Valid Atom 1.0]
Google PageRank Checker Powered by  MyPagerank.Net

Powered by FeedBurner

SEO Stats powered by MyPagerank.Net

Show

Show

Exploration

Welcome To My Blog

I hope you find what you're looking for here . . Thank you for visit to my simple blog . .

Rizky Maulana

This life is a sacrifice and struggle . . and I am just a man who wants to be better than ever . .