MyBB Support

Aoki's MyBB Helpdesk

Submitted by Aoki, , Thread ID: 10700

Thread Closed

RE: Aoki's MyBB Helpdesk

#19
23-10-2015, 03:36 PM
ScarlettJohansson Wrote:
So i have this shity color picker on my shity theme, now i know how to add div's, and id's to change colors
but no clue how zo add something like this ....

::-webkit-scrollbar-thumb, .thread_status.dot_newfolder::before



Code:
jQuery(document).ready(function($) {

$('.color-box').colpick({
  onChange:function(hsb,hex,rgb,el,bySetColor) {
$('.thead,.nav-options,.menu').css("background-color", "#"+hex);
$.cookie("mycookie", "#" + hex,{expires:365}); //set cookie with name "mycookie" and value that you have picked
  }
}).keyup(function(){
  $(this).colpickSetColor(this.value);
});


//Check if cookie exists
if (typeof $.cookie('mycookie') === 'undefined'){
//no cookie
} else {
//cookie is there, do something
$(".thead,.nav-options,.menu").css("backgroundColor", $.cookie('mycookie'));
}

});



TNX Aoki

Find:

Code:
$('.thead,.nav-options,.menu').css("background-color", "#"+hex);

Add below:
Code:
document.styleSheets[0].addRule( '.thread_status.dot_newfolder:before','background-color: #' + hex );
Do not let your difficulties fill you with anxiety, after all it is only in the darkest nights that stars shine more brightly. - Ali(a.s)

Developer( PHP, Python, C++, HTML+CSS, JS I am available for Hire. Message Me for details.


Users browsing this thread: 7 Guest(s)