Welcome Guest, Not a member yet? Register   Sign In
load event in javascript/jquery library doesn't work
#1

[eluser]Giorgio Nordo[/eluser]
In my controller I would like to hide a div identified with the id #divpannello during the loading of every page.
I used this code:
Code:
function __construct()
    {
      parent::__construct();
      $data = array();
      $codice = $this->javascript->hide('#divpannello');
      $this->javascript->load('#dummy', $codice);  /
      $this->javascript->compile();
    }

where #dummy is an id for an image used in my view

Code:
<img id="dummy" src="&lt;?php echo site_url(); ?&gt;application/views/images/dummy.png" />

just for allowing the load (I'm quite new oto jquery and I am not sure this is the simple and correct way).

The problem is that the jquery script seems work ONLY when I manually refresh the page.
Obviously, I would like to automatically run the jquery script when I pass to any page without reloading it.

Could someone help me insolving this trouble?
Thanks in advance,
Giorgio


Messages In This Thread
load event in javascript/jquery library doesn't work - by El Forum - 03-05-2011, 07:10 AM
load event in javascript/jquery library doesn't work - by El Forum - 03-05-2011, 07:58 AM
load event in javascript/jquery library doesn't work - by El Forum - 03-05-2011, 12:01 PM
load event in javascript/jquery library doesn't work - by El Forum - 03-05-2011, 04:42 PM



Theme © iAndrew 2016 - Forum software by © MyBB