Title: Adding jQuery module
Last modified: January 15, 2018

---

# Adding jQuery module

 *  Resolved [kentinada](https://wordpress.org/support/users/kentinada/)
 * (@kentinada)
 * [8 years, 2 months ago](https://wordpress.org/support/topic/adding-jquery-module/)
 * I want to add this small routine with this plugin but I’m not sure where to go.
   Can someone help?
 * jQuery( “h2.entry-title” ).each( function() {
    var panelId = jQuery( this ).html().
   toLowerCase().replace(/\s+/g, “-“); jQuery( this ).wrapInner(function() { return“
   <span style=’padding-top:96px;’ id='” + panelId + “‘></span>”; }) });

Viewing 1 replies (of 1 total)

 *  Plugin Author [SilkyPress](https://wordpress.org/support/users/diana_burduja/)
 * (@diana_burduja)
 * [8 years, 2 months ago](https://wordpress.org/support/topic/adding-jquery-module/#post-9866572)
 * Hi,
 * you can click on the “Add Custom JS” and paste your code there.
 * Note that you need to wrap your code in:
 * jQuery(document).ready(function( $ ){
    // your code });
 * This is necessary when using the jQuery library, as you do.
 * Here is the final code that you need to paste:
 * `
    jQuery(document).ready(function( $ ){ jQuery( 'h2.entry-title' ).each( function(){
   var panelId = jQuery( this ).html().toLowerCase().replace(/\s+/g, "-"); jQuery(
   this ).wrapInner(function() { return "<span style='padding-top:96px;' id='" +
   panelId + "'></span>"; }) }); });
 * [Here you’ll find a screenshot](https://www.silkypress.com/wp-content/uploads/2018/01/js-lowercase-titles.png)
   with how it’s supposed to look like.

Viewing 1 replies (of 1 total)

The topic ‘Adding jQuery module’ is closed to new replies.

 * ![](https://ps.w.org/custom-css-js/assets/icon-128x128.png?rev=1303730)
 * [Simple Custom CSS and JS](https://wordpress.org/plugins/custom-css-js/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/custom-css-js/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/custom-css-js/)
 * [Active Topics](https://wordpress.org/support/plugin/custom-css-js/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/custom-css-js/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/custom-css-js/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [SilkyPress](https://wordpress.org/support/users/diana_burduja/)
 * Last activity: [8 years, 2 months ago](https://wordpress.org/support/topic/adding-jquery-module/#post-9866572)
 * Status: resolved