I have this html code (with Smarty) :
Code: Select all
<div id="menu"> <ul> {section name="i" loop=$box} <li value="{$box[i]}"><a href="#" class="menu" >{$box[i]}</a></li> {/section} <li><a href="#">Recived</a></li> <li><a href="#">Filter</a></li> <li><a href="#">Spam</a></li> </ul></div> Code: Select all
$("#menu").find('li').click(function() { $('html').load("index.php", {'mailbox': $(this).find('li').attr('value'),//find('li').val(), 'controller' : 'mailbox', 'action' : 'mailbox'}); }); And second question, as u can see the load() function loads the content to 'html' but I don't know if it is good solution, cause it should just load the index.php instead of the file which exists before load() call. Is there a better way ?