There aren’t that many tutorials on how to use jQuery and Code Igniter together. I’ve written a bit on how to do some Ajax with jQuery and Code Igniter here, on the Code Igniter Forums. With jQuery, Ajax is pretty easy to do, once you figure out how to get it working once. The toughest part is figuring out how to have it send POST data to the right function of the right controller. If you want a working example, Download it Here. Be sure to read the README.txt! Don’t forget, the important issue when doing javascript of any kind is to make sure it degrades nicely – it has to work even if Javascript is turned off!

- gav

9 Responses to jQuery and Code Igniter

  1. handoyo

    Hi Gavin,i got errors with your code.It says $ is not defined..Thanks a lot..

  2. Zoe

    Hey, Handoyo — you probably need to include your jquery files in your header. Jquery defines $. You can get jquery here: JQuery.com

  3. handoyo

    Ok,i’ll try it out..Thanks

  4. Mark

    HI,
    When I tried to download the zip file my computer didn’t recognize it as a zip file and asked if I wanted to download it as a html file. I said no and then couldn’t unzip it. Sorry if this problem is just my computer messing up. And thanks in advance for making this!

  5. srg

    Is the example out of date?
    The link doesn’t work for me. Would you mind emailing the example?
    SRG

  6. NC

    Hi
    I’m curious in seeing how you make it work too.
    Unfortunately the link is broken…

    Could you kindly upload it again?

    Thanks

  7. Jhon Eye

    Hi Gavin,
    I cannot download your code. Could you give me the other link?
    Thanks before.

    eye99@ymail.com

  8. matt

    fix your links doods!!! :(

  9. Oytun

    Hey,

    Can you please renew your download link?
    I would appreciate it as i’ve been struggling with CI & JQuery for a couple of days! It’s annoying me… It gives 404 error as return…

    Thanks in advance,

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>