-
AuthorPosts
-
February 17, 2015 at 9:45 am #208562
Hi there,
I’ve been struggling a bit to get some custom jQuery to work, it’s a pretty simple piece of code to get a background color of an element to change when I mouse over a div on this page: http://www.murphydave.co.uk/newmdawebsite/about-us-2/
This is the code I’m using (i’ve put it in the customiser’s javascript box):
jQuery(document).ready(function(){
$(document).ready(function() {
$(‘.scrollable’).mouseenter(function() {
$(‘.scrollable > div > div > div > .jspDrag’).css(‘background-color’, ‘#c6c6c6’);});
});
});But even when I try something simple like:
jQuery(document).ready(function(){
$(document).ready(function() {
$(‘p’).hide();
});
});Nothing seems to happen, am I doing something wrong?
Thanks for your help, really enjoying using the theme!
Andrew.
February 17, 2015 at 1:39 pm #208744Hi Andrew,
Thanks for writing in!
Your website is having a JS conflict, upon checking, it seems you are using pretty single quotes that are causing this conflict (see: http://prntscr.com/66dvd7). So make sure to replace the pretty quotes from your custom jQuery code with normal quotes. So the current code in your custom JS section would become:
jQuery(document).ready(function($) { $('#resize-text').mouseenter(function() { $(this).css('color', 'red'); }); });
Cheers!
February 18, 2015 at 3:45 pm #209600Thanks! That’s good to know (didn’t realise I had my quotes default as ‘pretty’ ones).
Andrew.
February 18, 2015 at 11:13 pm #209850Glad we were able to help 🙂
October 22, 2015 at 7:42 am #635524Hi,
I’m trying to have a partly one page set up but partly other pages. I have the menu working but the 2 menu options that are suppose to link back to the 1 page don’t work from the other pages. I have tried using the code suggested and then the full URL but it doesn’t seem to be working. I wonder if I have got the URL wrong?
I am looking for ‘show reel’ and ‘get in touch’ to be on the main page.
October 22, 2015 at 8:49 am #635592Hi there @fleye,
Hope you’re well today and thanks for writing in.
I’ve checked your site and get a 500 internal server error when visiting the show reel link and it also goes to load https, we do have a guide here on setting up one page navigation: https://community.theme.co/kb/how-to-setup-one-page-navigation/
As the issue here looks quite a bit different than the original issue in this thread, can you start a new topic please and we’ll be right along to assist. 🙂
Thank you!
-
AuthorPosts