Welcome Guest, Not a member yet? Register   Sign In
Cannot get jqTouch working with CodeIgniter
#1

[eluser]Unknown[/eluser]
Hi,

I'm new to this forum, so I'm not sure if I'm posting in the right place... But anyway, I have previously used jqTouch to make web apps in Asp.Net MVC which have worked fine. I recently started using CodeIgniter, and now I want to be able to make web apps with CodeIgniter too. So I made a simple app to test it, and I can get the first page up fine. But when I click on a link/button, it just freezes (makes the button green like the default active styling in jqt theme, but nothing else happens).

Why is that, and how can I get it working?

Here's some simplified sample code:

view page:

Code:
<!DOCTYPE html>
&lt;html&gt;
&lt;head&gt;
    &lt;title&gt;Web app&lt;/title&gt;
    &lt;link href="&lt;?=base_url()?&gt;assets/css/iPhone.css" rel="stylesheet" type="text/css"/&gt;
    &lt;link href="&lt;?=base_url()?&gt;assets/scripts/jqTouch/themes/jqt/theme.css" rel="stylesheet" type="text/css"/&gt;

    [removed][removed]
    [removed][removed]

    [removed]
        var jQT = new $.jQTouch();
    [removed]
&lt;/head&gt;
&lt;body&gt;
<div id="jqt">
    <div id="home">
        <div class="toolbar">
            <h1>
                Test app
            </h1>
        </div>
        <ul id="#home">
            <li><a href="#test">Test</a></li>
        </ul>
    </div>
    <div id="test" class="swipe page">
        <div class="toolbar">
            <a class="button back" href="#">Back</a><a class="button slideright listButton" href="#home">Home</a></div>
        <h1 class="topictitle1">
            Test</h1>

        <div class="content">
            <div>
                <p>
                    Test page.
                </p>
            </div>
        </div>
    </div>
</div>
&lt;/body&gt;
&lt;/html&gt;

Controller:

Code:
public function index()
{
    $this->load->view('layout2');
}

So when opening http://localhost/app I get the first page, but then when clicking the link button it freezes.

BTW, I am using .htaccess mod_rewrite to get rid of the index.php part of urls, if that matters somehow in this. I don't think so though, because it doesn't seem to matter if I remove it...

Any help would be greatly appreciated, this is driving me nuts...




Theme © iAndrew 2016 - Forum software by © MyBB