I'm wondering if it is possible or if it is correct to proceed in such a way:
var initiate_shop = function(shop_navigation, shop_container_id, items_per_page) {
return $(shop_navigation).jPages({
containerID : shop_container_id,
first : false,
previous : false,
next : false,
last : false,
midRange : 15,
perPage : items_per_page,
animation : "fadeInUp",
links : "blank",
keyBrowse : true,
scrollBrowse : false,
callback : function(pages){
current_page = pages.current;
total_pages = pages.count;
}
});
};
If the above isn't correct what could be a better way to write it?