MyBB Support

Color Picker

Submitted by Carb0n, , Thread ID: 21823

Thread Closed
14-06-2016, 06:02 PM
#1
hey guys, i've installedthis color picker on my forum, but i've some issues...
I can't change the color for the scrollbar, even if i put the variable name in the elements to change.
Anyone can help me?Ty
we are all supposed to think of reasons to live

RE: Color Picker

#2
your scrollbar is part of your global.css

You probably have nothing inserted in there

Just include the scrollbar part of the css on your webkit: scrollbar and then edit the javascript accordingly

Thats my 2cents I could be wrong though

[Image: Yp8ZHSk.gif]

RE: Color Picker

#3
are you still having issues with this if so let me know
[Image: SIG.PNG]

RE: Color Picker

OP
This post was last modified: 14-06-2016, 08:37 PM by Carb0n
#4
14-06-2016, 07:08 PM
Zenith Wrote:
your scrollbar is part of your global.css

You probably have nothing inserted in there

Just include the scrollbar part of the css on your webkit: scrollbar and then edit the javascript accordingly

Thats my 2cents I could be wrong though
I include it, well the css class of my scrollbar is "::-webkit-scrollbar-thumb", so i add it to the elements wich must be changed with the color picker but nothing happens...

Btw, if you need the .js here we go:
Code:
jQuery.noConflict();

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

$('a[href=#top], a[href=#ipboard_body]').click(function(){
$('html, body').animate({scrollTop:0}, 400);
        return false;
});

$(".forum_name").hover(function() {
$(this).next(".forum_desc_pos").children(".forum_desc_con").stop()
.animate({left: "0", opacity:1}, "fast")
.css("display","block")
}, function() {
$(this).next(".forum_desc_pos").children(".forum_desc_con").stop()
.animate({left: "10", opacity: 0}, "fast", function(){
$(this).hide();
})
});

$('#topicViewBasic').click(function(){
$(this).addClass("active");
$('#topicViewRegular').removeClass("active");
$("#customize_topic").addClass("basicTopicView");
$.cookie('ctv','basic',{ expires: 365, path: '/'});
return false;
});

$('#topicViewRegular').click(function(){
$(this).addClass("active");
$('#topicViewBasic').removeClass("active");
$("#customize_topic").removeClass("basicTopicView");
$.cookie('ctv',null,{ expires: -1, path: '/'});
return false;
});

if ( ($.cookie('ctv') != null)){
$("#customize_topic").addClass("basicTopicView");
$("#topicViewBasic").addClass("active");
}
else{
$("#topicViewRegular").addClass("active");
}

var customElements = " #panel, .upper, .thead, .selected, .postbit_button, .active_tab, .pagination_current, .alert, ::-webkit-scrollbar-thumb";
var customText = ".post_block h3, .post_block h3 a, .theme_text,.navigation_menu";

$('#colorpicker').ColorPicker({
onSubmit: function(hsb, hex, rgb, el) {
$(el).val(hex);
$(el).ColorPickerHide();
$(el).css("backgroundColor", "#" + hex);
$(customElements).css("background-color", "#" + hex);
$(customText).css("color", "#" + hex);
document.styleSheets[0].addRule( '.thread_status.dot_newfolder:before','background-color: #' + hex );
$.cookie('customcolor',hex,{ expires: 365, path: '/'});
},
onBeforeShow: function () {
$(this).ColorPickerSetColor(this.value);
},
onChange: function (hsb, hex, rgb) {
$(customElements).css("background-color", "#" + hex);
$(customText).css("color", "#" + hex);
$.cookie('customcolor',hex,{ expires: 365, path: '/'});
}
})
.bind('keyup', function(){
$(this).ColorPickerSetColor(this.value);
});

if ( ($.cookie('customcolor') != null)){
$(customElements).css("background-color", "#" + $.cookie('customcolor'));
$(customText).css("color", "#" + $.cookie('customcolor'));
$("#colorpicker").val($.cookie('customcolor'));
}
else{
$(customElements).css("background-color","#3a85ba");
$(customText).css("color","#3a85ba");
}

});

That's the scrollbar class basically wich is in my global.css ----> ::-webkit-scrollbar-thumb {
background: #27ae60;
-webkit-box-shadow: inset 1px 1px 2px rgba(0,0,0,0.2);
}
we are all supposed to think of reasons to live

Users browsing this thread: 3 Guest(s)