Correct MVC in CodeIgniter In my CodeIgniter project I have a Login controller that load this view:

&lt;ul class="sub-menu"&gt;
    &lt;li&gt;
        &lt;a href="javascript:;" class = "menu-item" data-target="../indoamericana/soporte/callSupport/"&gt; Mis solicitudes &lt;/a&gt;
    &lt;/li&gt;
&lt;/ul&gt;


The controller: soporte, function: callSupport

public function callSupport($index = null, $order = null){
    $session_data = $this-&gt;session-&gt;userdata('session_user');
    $data['solicitud']  = $this-&gt;helpdesk_model-&gt;getRequest($session_data['usuario'], $index, $order); 
    $data['categories'] = $this-&gt;helpdesk_model-&gt;getCategories();
    $this-&gt;load-&gt;view('modules/help_desk/supports', $data);
}


With jQuery I call the controller and render in a page content that is a &lt;div&gt; element:

$(".sub-menu .menu-item, .module-item").click(function(event) {
    $(".page-content").load($(this).data('target'));  
    $("title").text( $( this ).text() );
});


In the view 'modules/help_desk/supports':

&lt;table class="table table-striped table-hover" id="admin-support" data-target="soporte/callSupport/"&gt; 
&lt;thead&gt;
&lt;tr&gt;
    &lt;th&gt;Estado &lt;a href="javascript:;"&gt;&lt;i class="icon-sort" data-sort="status"&gt;&lt;/i&gt;&lt;/a&gt;&lt;/th&gt;
    &lt;th&gt;Prioridad &lt;a href="javascript:;"&gt;&lt;i class="icon-sort" data-sort="priority"&gt;&lt;/i&gt;&lt;/a&gt;&lt;/th&gt;
    &lt;th&gt;Responsable &lt;a href="javascript:;"&gt;&lt;i class="icon-sort" data-sort="id_responsible"&gt;&lt;/i&gt;&lt;/a&gt;&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
    &lt;?php foreach ($solicitud as $key =&gt; $value) { ?&gt;
    &lt;tr&gt;
        &lt;td&gt;&lt;span class="label label-sm &lt;?= $value['label']?&gt; "&gt;&lt;?= ucfirst($value['status']) ?&gt;&lt;/span&gt;&lt;/td&gt;
        &lt;td&gt;&lt;span class="badge &lt;?= $value['class']?&gt; "&gt;&lt;?= $value['priority'] ?&gt;&lt;/span&gt;&lt;/td&gt;
        &lt;td&gt;&lt;?= $value['name'].' '.$value['last_name'] ?&gt;&lt;/td&gt;
    &lt;/tr&gt;
    &lt;?php  } ?&gt;
&lt;/tbody&gt;
&lt;/table&gt; 


As you can see, in the first &lt;td&gt; a put an anchor tag calls another controller with jQuery similar than before. Please be critical, very severe with me.
General comments
I don't see much wrong with the code. The biggest concern I might have is that PHP code is mixed in with the HTML - an alternative to this would be using a template system. CodeIgniter has the template parser class which should allow you to do this.

Please be critical, very severe with me.

Okay - I am not typically this critical but you asked for it! The next section has a couple other review points
Minor nitpicks
In the PHP code, $data is not declared before values are assigned to specific keys:

$data['solicitud']  = $this-&gt;helpdesk_model-&gt;getRequest($session_data['usuario'], $index, $order); 


I don't see a problem with this practice but the PHP documentation advises against it:

If $arr doesn't exist yet, it will be created, so this is also an alternative way to create an array. This practice is however discouraged because if $arr already contains some value (e.g. string from request variable) then this value will stay in the place and [] may actually stand for string access operator. It is always better to initialize a variable by a direct assignment.


I tried running the jQuery callback through the demo page on eslint.org. It showed this warning:

'event' is defined but never used.

For this line:

$(&quot;.sub-menu .menu-item, .module-item&quot;).click(function(event) {


While event could be used if necessary, it isn't needed.