CodeIgniter Forums
Jquery - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: Jquery (/showthread.php?tid=44353)



Jquery - El Forum - 08-12-2011

[eluser]Unknown[/eluser]
I need to include jquery and do some hide/animation

please suggest me the code

also in future i will look into jquery validation of form


Jquery - El Forum - 08-12-2011

[eluser]jblack199[/eluser]
Code:
[removed]
        $(function() {
            $("#show").click(function() {
                $("#theDiv").show("normal");
            });
            $("#hide").click(function() {
                $("#theDiv").hide("normal");
            });
        });
    [removed]

<div id="theDiv">
    </div>
    <button id="show">Show</button>
    <button id="hide">Hide</button>

Theres basic code to show and hide now its your job to expand upon it. jquery.com is a great resource for jquery functions. plenty of video tutorials on jquery floating around the web as well. I for one wont just give you code, but I'll get you started in the right direction so you can research and learn instead of just having it handed to you -- makes you a better programmer if you truely understand what is going on and why its happening.

enjoy.


Jquery - El Forum - 08-12-2011

[eluser]danmontgomery[/eluser]
http://api.jquery.com/hide/
http://api.jquery.com/show/