Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- BY: Masud Zakaria
- ata khothen kesu na color a click korla body ta akta class jog hoba oi class dhora kj korta hoba.... HTML code: <div class="color_swicer">
- <h2>choose color</h2>
- <ul id="switcher">
- <li id="skyButton"></li>
- <li id="greenButton"></li>
- <li id="redButton"></li>
- <li id="blueButton"></li>
- </ul>
- <h3 class="swice"><span><i class="fa fa-cog"></i></span></h3>
- </div> ata hoccha class jog houar code: $(document).ready(function(){
- $('#skyButton').click(switchGray);
- $('#greenButton').click(switchWhite);
- $('#redButton').click(switchBlue);
- $('#blueButton').click(switchYellow);
- function switchGray() {
- $('body').attr('class', 'sky');
- }
- function switchWhite() {
- $('body').attr('class', 'green');
- }
- function switchBlue() {
- $('body').attr('class', 'red');
- }
- function switchYellow() {
- $('body').attr('class', 'blue');
- }
- }); ar ata hoccha click korla animated side bar ar code: // color swice
- $(".swice").click( function(event){
- event.preventDefault();
- if ( $(this).hasClass("isDown") ) {
- $(".color_swicer").stop().animate({left:"-200px"}, 500);
- } else {
- $(".color_swicer").stop().animate({left:"0px"}, 500);
- }
- $(this).toggleClass("isDown");
- return false;
- }); and css code: background: none repeat scroll 0 0 #fff;
- display: block;
- height: 340px;
- left: -200px;
- padding: 20px;
- position: fixed;
- top: 25%;
- width: 200px;
- z-index: 99999;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement