Title: Adding 2nd jquery function failed
Last modified: July 20, 2017

---

# Adding 2nd jquery function failed

 *  Resolved [leandros21](https://wordpress.org/support/users/leandros21/)
 * (@leandros21)
 * [8 years, 10 months ago](https://wordpress.org/support/topic/adding-2nd-jquery-function-failed/)
 * Hello, i’m trying to add a second jquery function to the header.php tested all
   the possibilities but always failed to execute successfully.
 * To make the long story short, i’m trying to minimize a slider using toggle.
 *     ```
       <script>
       (".minim").click(function(){
           $(".activeSlider").toggle();
       });
       </script>
       ```
   
 * Above this snippet, i have almost the same snippet with other element
    hiding
   the menu. I tried to add the line of toggle to the other code successfully but
   by function above it doesn’t work.
 * Any idea?
    -  This topic was modified 8 years, 10 months ago by [leandros21](https://wordpress.org/support/users/leandros21/).

Viewing 10 replies - 1 through 10 (of 10 total)

 *  Moderator [Steven Stern (sterndata)](https://wordpress.org/support/users/sterndata/)
 * (@sterndata)
 * Volunteer Forum Moderator
 * [8 years, 10 months ago](https://wordpress.org/support/topic/adding-2nd-jquery-function-failed/#post-9338359)
 * replace the `$` with `jquery`. See [https://digwp.com/2011/09/using-instead-of-jquery-in-wordpress/](https://digwp.com/2011/09/using-instead-of-jquery-in-wordpress/)
 *  [Rajan Vijayan](https://wordpress.org/support/users/rajanit2000/)
 * (@rajanit2000)
 * [8 years, 10 months ago](https://wordpress.org/support/topic/adding-2nd-jquery-function-failed/#post-9338798)
 * Try to add in ready state
 *     ```
       <script>
       $function({
       	(".minim").click(function(){
       	    $(".activeSlider").toggle();
       	});
       });
       </script>
       ```
   
 *  [rameshcherukuru](https://wordpress.org/support/users/rameshcherukuru/)
 * (@rameshcherukuru)
 * [8 years, 10 months ago](https://wordpress.org/support/topic/adding-2nd-jquery-function-failed/#post-9339761)
 * Can you check what error is coming the console?
 *  Thread Starter [leandros21](https://wordpress.org/support/users/leandros21/)
 * (@leandros21)
 * [8 years, 10 months ago](https://wordpress.org/support/topic/adding-2nd-jquery-function-failed/#post-9339966)
 * Thank you guys for your replies, the first two solutions doesn’t solve my problem.
 * [@rameshcherukuru](https://wordpress.org/support/users/rameshcherukuru/)
    While
   i’m clicking on the .minim i don’t see anything in the console, but i pasted 
   the function and see some variables i have no idea what is about.
 * Let me show you the test site [http://www.onlineforextradingaccount.com/metaplasisdevelopers](http://www.onlineforextradingaccount.com/metaplasisdevelopers)
 * personally i believe it’s more logical than technical error.
    *The problem is
   on the small slider(slideshow)
 * Thanks in advance
 *  [rameshcherukuru](https://wordpress.org/support/users/rameshcherukuru/)
 * (@rameshcherukuru)
 * [8 years, 10 months ago](https://wordpress.org/support/topic/adding-2nd-jquery-function-failed/#post-9340100)
 * Hi leandros21,
 * I think you added following code
 *     ```
       " $(".minim").click(function(){
           $(".Activelider").toggle();
   
       }); "
       ```
   
 * this code is correct. But i did not find ” Activelider ” class in you page. Can
   you please change the class name and check.
 *  Thread Starter [leandros21](https://wordpress.org/support/users/leandros21/)
 * (@leandros21)
 * [8 years, 10 months ago](https://wordpress.org/support/topic/adding-2nd-jquery-function-failed/#post-9340138)
 * Thank you for the reply, probably you saw the code while i was testing it, it’s
   not correct because i forgot an “s” between activeSlider class. 🙂
 *  Thread Starter [leandros21](https://wordpress.org/support/users/leandros21/)
 * (@leandros21)
 * [8 years, 10 months ago](https://wordpress.org/support/topic/adding-2nd-jquery-function-failed/#post-9340187)
 * Just moved the minimize icon from position:relative and make it box-sizing:inherit
   and the function works, probably the problem is that the minimize icon is not
   clickable in the position i want it. Can you please tell me how to move it above
   the small slider and be clickable?
 *  [rameshcherukuru](https://wordpress.org/support/users/rameshcherukuru/)
 * (@rameshcherukuru)
 * [8 years, 10 months ago](https://wordpress.org/support/topic/adding-2nd-jquery-function-failed/#post-9340215)
 * Yes. I think that is css problem. some css is overlapping.
 *  Thread Starter [leandros21](https://wordpress.org/support/users/leandros21/)
 * (@leandros21)
 * [8 years, 10 months ago](https://wordpress.org/support/topic/adding-2nd-jquery-function-failed/#post-9340237)
 * Can you please help? I’m also trying to find a solution but…
 *  Thread Starter [leandros21](https://wordpress.org/support/users/leandros21/)
 * (@leandros21)
 * [8 years, 10 months ago](https://wordpress.org/support/topic/adding-2nd-jquery-function-failed/#post-9340636)
 * Any idea?
    Also i noticed that slider is not fullscreen(100vh) when the small
   slideshow is enabled.
 * Any help is highly appreciated.
 * **Updated**
 * I reduced the bottom of the element used to be front of the minimize icon and
   everything is fixed.
    -  This reply was modified 8 years, 10 months ago by [leandros21](https://wordpress.org/support/users/leandros21/).

Viewing 10 replies - 1 through 10 (of 10 total)

The topic ‘Adding 2nd jquery function failed’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 10 replies
 * 4 participants
 * Last reply from: [leandros21](https://wordpress.org/support/users/leandros21/)
 * Last activity: [8 years, 10 months ago](https://wordpress.org/support/topic/adding-2nd-jquery-function-failed/#post-9340636)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
