Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 782
  • Last Modified:

JQery color picker issues

Hi guys,

So I have the colour picker working on my personal website...

http://www.deans-place.co.uk/colourpicker/

When I try to upload it onto my work system it will not work? The letter 'c' in this link is where it should sit. Its like a management system so I uploaded various files into various locations and obv there is the template code around it, but I cant figure out what is stopping it from working....

http://test.urban-outdoors.co.uk/shop/test.html

Cheers,
Dean
0
deanlee17
Asked:
deanlee17
  • 7
  • 6
1 Solution
 
GaryCommented:
Your colpick.js and the tabs js file are being redirected to /
So you probably have an error in your htaccess
0
 
deanlee17Author Commented:
tabs js file?

Sorry, how did you check for the above?

Thanks.
0
 
GaryCommented:
HttpFox for FF

<script src="js/jquery.tabSlideOut.v1.3.js"></script>
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
deanlee17Author Commented:
Ah this page isnt using that file.
0
 
GaryCommented:
Maybe so but it just points to a common problem - both js files reside in the same folder (/js) and both are being redirected to the root folder - ergo no such file exist there.
0
 
deanlee17Author Commented:
Ye good point. I have updated those. No change.
0
 
GaryCommented:
Bit weird, cannot see why its not initialising the plugin - I can do it manually in the page and get it to work.
Can you move the colpick script tag and the initialization script to just before the closing BODY tag - maybe there is a timing issue.
0
 
deanlee17Author Commented:
Just off home form work, will be looking at it this evening so I shall give that a try and report back.

Cheers.
0
 
deanlee17Author Commented:
Im assuming you are referring to the below:

$(function(){
  $('.color-box').colpick({
	colorScheme:'dark',
	layout:'rgbhex',
	color:'ff8800',
	onSubmit:function(hsb,hex,rgb,el) {
		$(el).css('background-color', '#'+hex);
		$(el).colpickHide();
	}
})
.css('background-color', '#ff8800');
});

Open in new window


<script src="http://www.ishop.co.uk/roots/1200/js/colpick.js" type="text/javascript"></script>

Open in new window


That are currently sitting in the header?
0
 
GaryCommented:
Yep, move them to before the closing body (with the script tag first)
0
 
deanlee17Author Commented:
That was a great idea, as you can now see, its almost perfect.
0
 
GaryCommented:
Looks good to me, what is it that is not perfect.
0
 
deanlee17Author Commented:
Oh nothing, I just to reduce the length of the div, which I did.

Cheers for the help!
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 7
  • 6
Tackle projects and never again get stuck behind a technical roadblock.
Join Now