I have the problem: there is a script for asyncronous page changing and loading using Jquery (Ajax):
$('.page_button').live('click',function() {
$('#ajaxBusy').show();
$('.selected_page_button').attr('class','page_button');
$(this).attr('class','selected_page_button');
$.post("http://"+document.location.host+"/index.php/welcome/update_records_set/"+this.id,
function(data)
{
if (data != "")
{
$(".records_content:last").empty();
$(".records_content").html(data);
}
$('#ajaxBusy').hide();
});
});
This code works, but I also need to add “#page” for URL without refreshing. Also, I use CodeIgniter for developing, and this function from some controller loads a page:
public function language_testing($language_code) {
//some actions
}
But how can I extract page number from “http://some_site/controller/en#5” in order to load fifth page? Is there standard way for it?
If you mean you want to get hash value from url then you could do:
and if you want it from url then:
You can set hash like:
Did you mean something like that