calling php same div and another div at the same time
hi,
i am new to forum and jquery. and I have a question about jquery.
basically when i click on a link in a div i want the change this div and another div, and url. I googled it but i couldnt find a solution.
I have to php file, one is
bring.php which connect sql and list database order by limit by looking page=id given at url,
second php is;
paging.php
which shows page. if it is same page with page, it shows unclickable with classname "current"
other page numbers are clickable with classname "link"
I have a page format like this
<div class="comments">
<?php
require("bring.php");
?>
</div>
<div class="pagination">
<?php
require("paging.php");
?>
</div>
in this page, pagination div is fixed bottom by css, and shows my page id links.
It works properly by loading page again. in the "pagination class" when it is 1..4 5 [6] 7 8 .. 12 like this. when I click 7 it becomes 1..56[7]89..12 which [ ] means unclickable.
now what I want to make is when I click any other id's I want to change "comments" div according to page id. at the same time I want to reload pagination to see new page id's. at the same time I want to see my urls on browser like domain/comments.php?page=1. I dont know if is possible.
here is my attempt.
I wrote a script like this by inspiring from other discussion on this forums, but it didnt work.
$("a.link").click(function(event){
alert("worked");
$('.comments').load("
bring.php");
$('.pagination').load("paging.php");
return false;
});
even i didnt get the alert when i click page links.
how can I make it worked like this?