The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

jQuery In Custom cPanel Theme

Discussion in 'User Experience' started by Xarcell, Oct 25, 2012.

  1. Xarcell

    Xarcell Member

    Joined:
    Oct 25, 2012
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Website Owner
    I made a custom cPanel theme for a client that matches their wordpress/ipb/whmcs themes. The script works in all other themes, plus locally. I can't figure why it doesn't work in cpanel theme. Is there something I should know about adding javascript to a cPanel theme?

    Here is an example of the scripts used:

    Code:
    <script type="text/javascript">
    var LiveHelpSettings = {};
    LiveHelpSettings.server = 'portal.xxxxxx.com/modules';
    LiveHelpSettings.embedded = false;
    LiveHelpSettings.protocol = 'https://';
    (function(d, $, undefined) {
    	$(window).ready(function() {
    		var LiveHelp = d.createElement('script'); LiveHelp.type = 'text/javascript'; LiveHelp.async = true;
    		LiveHelp.src = ('https:' == d.location.protocol ? 'https://' : 'http://') + LiveHelpSettings.server + '/livehelp/scripts/jquery.livehelp.js';
    		var s = d.getElementsByTagName('script')[0];
    		s.parentNode.insertBefore(LiveHelp, s);
    	});
    })(document, jQuery);
    </script>
    and

    Code:
    <script type="text/javascript">
    $(function() {
    $(".h-plan-t-style3 a[title]").tooltips();
    });
    </script>
    Any ideas?
     
  2. cPanelKye

    cPanelKye Registered

    Joined:
    Nov 14, 2012
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    I'll start by saying that cPanel does not use jQuery so you would have to import the library yourself.

    If this doesn't fix your issue, could you tell me which file you are adding the code to?
     
Loading...

Share This Page