Title: Full calendar adding custom jquery script
Last modified: August 21, 2016

---

# Full calendar adding custom jquery script

 *  [jcbov](https://wordpress.org/support/users/jcbov/)
 * (@jcbov)
 * [13 years, 1 month ago](https://wordpress.org/support/topic/full-calendar-adding-custom-jquery-script/)
 * Hello,
 * i am facing an issue, trying to making work a jquery script into Fullcalendar.
   Is there a jquery ninja who could help?
 * The purpose of the script is to retreive an event based on the text inside div.
   fc-event-inner, and add a background color to it.
 * the script work perfectly well in a standard page (no calendar) with same classes
   as in the fullcalendar. but not in the fullcalendar. Which keeps shows this light
   green background color.
 * jQuery(document).ready(function() {
    jQuery(‘div.fc-event-inner:contains(“PIQUET
   APRES-MIDI PLACES LIBRES: 2 RESERVER”)’).css(‘background’,’green!important’);
   jQuery(‘div.fc-event-inner:contains(“PIQUET MATIN PLACES LIBRES: 0 COMPLET!”)’).
   css(‘background’,’red!important’); });
 * the script is enqueued properly in my fonctions.php…
 * Please someone help me make this work! should be intersting for other users.
 * thank you very much!
 * [http://wordpress.org/extend/plugins/wp-fullcalendar/](http://wordpress.org/extend/plugins/wp-fullcalendar/)

Viewing 1 replies (of 1 total)

 *  [gyroscopic](https://wordpress.org/support/users/gyroscopic/)
 * (@gyroscopic)
 * [13 years ago](https://wordpress.org/support/topic/full-calendar-adding-custom-jquery-script/#post-3666952)
 * Hi jcbov,
 * Why dont you create a page template with the script hard coded in it and call
   the template for the calendar page (instead of enqueuing it in the functions.
   php), that way the script is only included on the pages needed, not the whole
   site. This will also make it easier to debug with regard to js conflicts etc.
 * Hope that helps.

Viewing 1 replies (of 1 total)

The topic ‘Full calendar adding custom jquery script’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/wp-fullcalendar.svg)
 * [WP FullCalendar](https://wordpress.org/plugins/wp-fullcalendar/)
 * [Support Threads](https://wordpress.org/support/plugin/wp-fullcalendar/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-fullcalendar/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-fullcalendar/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-fullcalendar/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [gyroscopic](https://wordpress.org/support/users/gyroscopic/)
 * Last activity: [13 years ago](https://wordpress.org/support/topic/full-calendar-adding-custom-jquery-script/#post-3666952)
 * Status: not resolved