Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 2 of 2
  1. #1
    Member
    Join Date
    Aug 2011
    Posts
    12

    Lightbulb Why jquery doesnt wok under cPanel modules ?

    HI,
    I am developing a cpanel module, why jquery doesnt work ?
    I want to reload a specific <div> after some X seconds, well I have a script ready with me, it is as follows >>

    Code:
    <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.0/jquery.min.js"></script>
    <script>
    var auto_refresh = setInterval(
    function()
    {
    $('#listbackup').fadeOut('slow').load(tstep3.php').fadeIn("slow");
    }, 5000);
    </script>
    Below <div class="body-content"> I am using <div id="listbackup"></div>

    SO it looks like >>
    <div class="body-content">
    <div id="listbackup">
    </div>
    </div>



    How can I solve this issue ?

  2. #2
    Member This forum account has been confirmed by cPanel staff to represent a vendor. KostonConsulting's Avatar
    Join Date
    Jun 2010
    Location
    Austin, TX
    Posts
    97
    cPanel/Enkompass Access Level

    Root Administrator

    Default Re: Why jquery doesnt wok under cPanel modules ?

    I use jquery all the time within cPanel. Have you loaded up a browser with a javascript console to check for errors?

    Try wrapping your code with a try catch to output errors to the console:


    Code:
    <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.0/jquery.min.js"></script>
    <script>
    try{
        var auto_refresh = setInterval(
        function()
        {
            $('#listbackup').fadeOut('slow').load(tstep3.php').fadeIn("slow");
        }, 5000);
    }catch(err){
       console.log('There was an error: ' + err);
    }
    </script>
    Dave Koston
    Koston Consulting
    http://www.kostonconsulting.com

Similar Threads & Tags
Similar threads

  1. How do I install jQuery Lightbox 2 on my site with cPanel?
    By Jacko889 in forum New User Questions
    Replies: 6
    Last Post: 03-19-2011, 02:05 AM
  2. Mod Security Blocking jQuery.cookie.js in Drupal Installation
    By scielcoi in forum cPanel and WHM Discussions
    Replies: 3
    Last Post: 02-11-2011, 09:45 AM
  3. jquery lib on server
    By kevinvp in forum New User Questions
    Replies: 0
    Last Post: 11-23-2010, 09:03 AM
  4. mod security is blocking jquery menu
    By crazyaboutlinux in forum Security
    Replies: 12
    Last Post: 03-28-2009, 07:58 AM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube