• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
couldn't show effect using jquery in CodeIgniter2.01?

#1
[eluser]liren[/eluser]
Hello friends!

I read CodeIgniter201\user_guide\libraries\javascript.html,but it don't work until now.I want to use jquery with CodeIgniter2.But I can't controll the view effect by my code. My controller is:
Code:
$this->load->library('javascript');
$this->jquery->show("#effect", "slow");
$this->load->view('/page/edit_view',$data);

My view page:
Code:
<div class="toggler">
    <div id="effect" class="ui-widget-content ui-corner-all">
        <h3 class="ui-widget-header ui-corner-all">Show</h3>
        <p>
            You order it before.
        </p>
    </div>
</div>

&lt;/BODY&gt;
&lt;/HTML&gt;

But when I open the url,nothing happened Sad
How to use jquery effect with codeigniter? Thanks!

#2
[eluser]patwork[/eluser]
Did you insert javascript tags into page header?

http://ellislab.com/codeigniter/user-gui...cript.html

Code:
&lt;?php echo $library_src;?&gt;
&lt;?php echo $script_head;?&gt;

#3
[eluser]liren[/eluser]
[quote author="patwork" date="1302638164"]Did you insert javascript tags into page header?

http://ellislab.com/codeigniter/user-gui...cript.html

Code:
&lt;?php echo $library_src;?&gt;
&lt;?php echo $script_head;?&gt;
[/quote]

Thank you patwork!

I finally find the reason. My web page have many "<div>" code.So the jquery open layer(effect div) don't show normally. even I set these div's z-index to -1 it don't work :(
I have to change my web page's div to table if I want to use jquery effect.


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


Users browsing this thread:
1 Guest(s)


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