Title: calling javascript in jquery UI tab
Last modified: August 20, 2016

---

# calling javascript in jquery UI tab

 *  [hankmoody](https://wordpress.org/support/users/hankmoody/)
 * (@hankmoody)
 * [14 years, 11 months ago](https://wordpress.org/support/topic/calling-javascript-in-jquery-ui-tab/)
 * Hi I really hope someone can help me as I am tearing my hair out. I built my 
   clients site theme around the Jquery Post UI tabs plugin. The plugin is simply
   the wordpress version of jQuery’s excellent ui tabs. My client is adamant that
   this should not change. I now need to embed a booking js booking calendar in 
   one of the tabs (this is NOT a wordpress plugin as I couldn’t find anything that
   met the clients needs – the the scripts ar eloaded into the public_html folder
   and admin is outside of the wordpress admin environment for now).
 * I placed the following code in my header.php:<link type=”text/css” rel=”stylesheet”
   href=”/cal/css/calendar.css” />
    <link type=”text/css” rel=”stylesheet” href=”/
   cal/ajax.php?controller=calendars&action=css&cid=1″ /> <script type=”text/javascript”
   src=”/cal/js/custom.js”></script> <script type=”text/javascript” src=”/cal/js/
   front.js”></script>`
 * Secondly, in a UI tab, and between the [tab] and [/tab], I placed this code to
   call the javascript :
    `<script type="text/javascript" src="/cal/load.php?cid
   =1&view=1"></script>`
 * The calendar IS visable and seems to be working BUT it appears AFTER(under) the
   UI tab window. ie looks like the calendar js is only running AFTER the jquery
   UI tab. I have tried a number of ideas without success (javascript plugins for
   example) but the result is always the same – the calendar renders outside the
   ui tab area.
 * Could someone please point me in the right direction – iwould be really grateful.

Viewing 1 replies (of 1 total)

 *  [Mark / t31os](https://wordpress.org/support/users/t31os_/)
 * (@t31os_)
 * [14 years, 11 months ago](https://wordpress.org/support/topic/calling-javascript-in-jquery-ui-tab/#post-2162797)
 * What’s in the file called from this line?
 *     ```
       <script type="text/javascript" src="/cal/load.php?cid=1&view=1"></script>
       ```
   
 * If i had to guess i’d say the script simply adds some elements to the DOM(the
   page) after load, and it’s not necessarily just going to insert those elements
   where you call the script.
 * Can you post a copy of that file in a [pastebin](http://pastebin.com/) and report
   the link back here please.

Viewing 1 replies (of 1 total)

The topic ‘calling javascript in jquery UI tab’ is closed to new replies.

## Tags

 * [javascript](https://wordpress.org/support/topic-tag/javascript/)
 * [jquery](https://wordpress.org/support/topic-tag/jquery/)
 * [tab content](https://wordpress.org/support/topic-tag/tab-content/)
 * [ui.tabs](https://wordpress.org/support/topic-tag/ui-tabs/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 1 reply
 * 2 participants
 * Last reply from: [Mark / t31os](https://wordpress.org/support/users/t31os_/)
 * Last activity: [14 years, 11 months ago](https://wordpress.org/support/topic/calling-javascript-in-jquery-ui-tab/#post-2162797)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
