• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
My js code from template runs two tiems

Hey I have problem with my js code that is in CI template. He runs two times instead of one time. This is my test example:
$(document).ready(function() {
In firebug console I see this:
"js" is log from my js file. I was checking what will be executed first.

This part of js code is in template that is returned as a string:
$string = $this->load->view('myfile', '', true);
Then this $string is printed by echo in another template that is sent directly to browser:
$this->load->view('blogview', $data);

I don't have idea why it is like this. Maybe because template in template? Or because that I did retuned first template as string?

Problem solved. I did buy template from theme forest. I did look that they are getting one atribute and put in in other via js.
Post closed.

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.