Skip Navigation

[Resolved] JQuery is not working on all of my pages? Could you explain why.

This thread is resolved. Here is a description of the problem and solution.

Problem:
jQuery is not working on all the pages of website. Here is my jQuery code:

jQuery( document ).on( "click", "#test-togg", function() {
  jQuery( "#toggle-search" ).slideToggle( "fast", function() {
  });
});

Solution:
- Check All Toolset plugins are updated.
- Toolset Layout was not used on Contact page due to which Custom JS code was not included on the page. I have installed Simple Custom CSS and JS plugin and added the Custom JS code using it:
https://wordpress.org/plugins/custom-css-js/

This support ticket is created 7 years, 6 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 12:00 – 17:00 12:00 – 17:00 12:00 – 17:00 12:00 – 17:00 12:00 – 17:00 -
- 18:00 – 21:00 18:00 – 21:00 18:00 – 21:00 18:00 – 21:00 18:00 – 21:00 -

Supporter timezone: Asia/Karachi (GMT+05:00)

This topic contains 6 replies, has 2 voices.

Last updated by Noman 7 years, 6 months ago.

Assisted by: Noman.

Author
Posts
#504738
111.PNG

I am trying to: Get my JQuery searchbar to hide and show

I visited this URL:hidden link

I expected to see:The Search bar to show and hide when the maginifine button is pressed like on the home page
here is my JQuery


jQuery( document ).on( "click", "#test-togg", function() {
  jQuery( "#toggle-search" ).slideToggle( "fast", function() {
  });
});

Instead, I got:Nothing happens

#504755

Noman
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Hi Patrick,

Thank you for contacting Toolset Support. I have taken a look at your site. This search box is basically coming from your Theme and YITH plugin and is not related with Toolset plugin as I can see it.

But I would still like to give it a try and try to update the jQuery function for you. I will need to take a look at your setup to solve this issue. So I need to request temporary access (WP-Admin & FTP access) to your site

Your next answer will be private which means only you and I have access to it.

=== Please backup your database and website ===

✙ I would additionally need your permission to de-activate and re-activate Plugins and the Theme, and to change configurations on the site. This is also a reason the backup is really important.

✙ Please also add the path for the file(s) where you have added this jQuery code

Looking forward to help you.
Thank you

#506294

Noman
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Plugins.png

Hello Patrick,

Thank you for providing login details.

I have also noticed that your site is using older versions of Toolset Layouts and Views and I have tried to update but was not able to update (see attached screenshot), please re-register Toolset plugin in your site so that the updates work fine. I suggest you to please update ALL Toolset plugins to it's latest versions. Or you can download it from your account: https://toolset.com/account/downloads/

- I have cleared W3 Total Cache and disabled the plugin temporarily until we resolve this issue.
- I have also created a backup using Duplicator plugin.

Looking forward to help you.
Thank you

#506364

Noman
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Hello Patrick,

Thank you for waiting on this. I found out the problem, basically Layout was not used on Contact page due to which Custom JS code was not included on the page. have installed Simple Custom CSS and JS plugin and added Custom JS code here: hidden link

- Now search is working fine on all pages: hidden link

- You can also add this JS in your header.php file so that it gets included in all pages. If you do not wish to use the above plugin that I have installed.

I hope it helps,
Thank you

#506571

Thank you very much Noman,

Have a great day!

#507151

Hello, I am having an issue that is related, the bootstrap navbar is not collapsing in mobile view on the home, gallery and shop page? Could you help me find out why?

The "collapsing" class seems to run and then half way through it stops running?

#507986

Noman
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Hi Patrick,

That's because of the theme you are using, the issue appearing from the theme.

This ticket is closed and issue is not directly related. If you think its a Toolset plugin issue, please kindly open a new ticket for these additional questions and assign the new ticket to me directly so I can help you there. This will help other users with similar problems to find solutions when searching the forum.

Please note that if its a theme issue we won't be able to debug that 🙂
Thank you

This ticket is now closed. If you're a Toolset client and need related help, please open a new support ticket.