-
AuthorPosts
-
March 11, 2015 at 6:44 pm #225472
I am trying to use a simple jQuery script to show and hide content on the page.
Here is my script:
jQuery(document).ready(function($) {
$(‘#fvrooms’).click(function() {
$(“.fvrooms”).show();
$(“.fvsuites”).hide();});
$(‘#fvsuites’).click(function() {
$(“.fvsuites”).show();
$(“.fvrooms”).hide();});
});The Ids are used on buttons and then the content I want to hide and show are given the classes. I have used this same script on a few different sites and they all work fine. But for some reason with your theme this function doesn’t seem to be working.
Can you give me any advice? Unfortunately I am working on the site locally so I can’t give you a link to look at.
Thanks!
March 11, 2015 at 9:34 pm #225572Hello There,
It seems you got the code mixed up. Please try this revised code if will work on you end.
jQuery(document).ready(function() { jQuery("#fvrooms").click(function() { jQuery(".fvrooms").show(); jQuery(".fvsuites").hide(); }); jQuery("#fvsuites").click(function() { jQuery(".fvsuites").show(); jQuery(".fvrooms").hide(); }); });
Hope this helps.
-
AuthorPosts