Skip Navigation

[Resolved] close ticket and insert jQuery into js editor

This support ticket is created 3 years, 10 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
9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 - - 9:00 – 13:00
14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 - - 14:00 – 18:00

Supporter timezone: Africa/Casablanca (GMT+01:00)

This topic contains 4 replies, has 2 voices.

Last updated by davidm-13 3 years, 10 months ago.

Assisted by: Jamal.

Author
Posts
#1960205

Hi,
I receive an error when trying to close ticket: https://toolset.com/forums/topic/parent-post-titles-containing-html-special-characters/ - this ticket is resolved.

I would like to insert the following jQuery:

<script type="text/javascript">
$(function() {
$ ( '#sticky-navigator' ). StickyNavigator ({ wrapselector : '#content' }); 
});
</script>

into the js editor section of content template, please could you tell me the format.
Thanks

#1960311

Hello and thank you for contacting the Toolset support.

I suspect that you could not close the previous ticket because of a temporary server glitch in our servers. I closed it from my side.

To add the custom code to the content template, you need to remove the wrapping HTML tags:

<script type="text/javascript">

</script>

I would also suggest using jQuery instead of $ in the first line, and pass $ in the function parameters:

jQuery(function($) {
  $ ( '#sticky-navigator' ). StickyNavigator ({ wrapselector : '#content' }); 
});
#1960447
toc-error.JPG

Hi Jamal,
Thanks for quick reply. I tried as you suggested and got the attached error.
Know it's difficult to say much just from the error without seeing the whole picture.
Maybe I'll try another jQuery TOC. Any recommends on one that's sticky - stays visible at the side while scrolling content?
Thanks

#1961197

At first sight, it seems that you did not include the jQuery TOC Javascript files, or you are not using the jQuery plugin correctly.

Toolset can load Bootstrap 3 or Bootstrap 4, if you are using one of them, I am pretty sure there is a built-in way to make something sticky. For example hidden link

I am not very familiar with a specific plugin. You can check this page and search for the plugin that suits your needs hidden link

#1961297

My issue is resolved now. Thank you!