[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="<?php echo site_url(); ?>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