MyBB Support
Color Picker
Submitted by Carb0n, 14-06-2016, 06:02 PM, Thread ID: 21823
Thread Closed
RE: Color Picker
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...14-06-2016, 07:08 PMZenith 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
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: 1 Guest(s)