Tagged: x
-
AuthorPosts
-
May 6, 2016 at 10:28 am #978703
markspikerussellParticipantHi,
I have the following js and html in a raw block on my page here http://109.169.59.51/~focusfit/yoga-ashtanga-style/
<script src=”https://code.jquery.com/jquery-1.10.2.js”></script>
<button class=”show-contact shade my-flex”>[x_icon type=”comments-o”]</button>
<script>
$( “button” ).click(function() {
$( “.contact-btn-raw” ).toggle( “slow” );
});
</script>The script is working well, but this seems to have stopped the dropdown in the menu bar from working, and has changed the header type from fixed to static. Its only affecting this page. Is there any help you could provide?
I’m just trying to toggle on/off the class .contact-btn-raw
All WP, X, CS and other plugins up to date.
Server running on PHP7.
No caching or minification enabled yetThanks
May 6, 2016 at 5:44 pm #979421
DarshanaModeratorHi there,
Thanks for writing in! Could you please try disabling the timetable plugin that you have as I see console error with related to that plugin.
Let us know how it goes.
Thanks!May 7, 2016 at 4:36 am #979986
markspikerussellParticipantHi, I sure can, although that timetable plugin is activated on all the other pages with no affect to those pages.
Will report back.
May 7, 2016 at 4:41 am #979990
markspikerussellParticipantHi, Timetable plugin disabled and is made no affect.
The timetable shortcode is in modal pop-ups on almost every page with no adverse affects.
The only page that is affected is the one with the script above.
Any ideas?
ThanksMay 7, 2016 at 7:09 am #980076
ChristopherModeratorHi there,
Please add following code in Customize -> Custom -> JavaScript :
jQuery(document).ready(function($){ $(window).scroll(function(){ if ($(this).scrollTop() > 10) { $('.page-id-17 .x-navbar').addClass("x-navbar-fixed-top"); } else { $('.page-id-17 .x-navbar').removeClass("x-navbar-fixed-top"); } }); });Please add following code in Customize -> Custom -> CSS :
.page-id-17 li.menu-item-has-children:hover ul { display: block; }Hope it helps.
May 8, 2016 at 4:30 am #980854
markspikerussellParticipantHi Guys, that worked great!
So now that page works better that the others, when you hover over the ‘Classes & Clubs’ menu item the megamenu drops down without having to click.
Will I have to add the same for each page, or can I call them all in one CSS and one jQuery?
Thanks
May 8, 2016 at 5:40 am #980887
Nabeel AModeratorHi again,
To make it generic, you can replace the previous code with this one:
jQuery(document).ready(function($){ $(window).scroll(function(){ if ($(this).scrollTop() > 10) { $('.x-navbar').addClass("x-navbar-fixed-top"); } else { $('.x-navbar').removeClass("x-navbar-fixed-top"); } }); });And CSS will be:
li.menu-item-has-children:hover ul { display: block; }Hope this help!
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-978703 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
