jquery - using a function id in a different function
- by andrew
Hi,
I have a function like that:
function loadcategory(id) {
jQuery("#categoryArea").load("ajax_post_category.php?catid="+id+"");
}
im getting id via link like that:
<a href='javascript:loadcategory(".$row['catid'].");'>
i would like to use function loadcategory(id)'s id in a different function. for example:
function different() {
jQuery("#different").load("ajax_post_category.php?catid="+loadcategory(id)+"");
}
as you can see i wanted to use +loadcategory(id)+, however i havent gotten any values. well, how can i get that value by jquery? i dont know, can anyone tell me the true way?
regards