(function () { var showmorenchildren = function ($children, n) { var $hiddenchildren = $children.filter(":hidden"); var cnt = $hiddenchildren.length; for (var i = 0; i < n && i < cnt ; i++) { $hiddenchildren.eq(i).show(); } return cnt - n; } jquery.showmore = function (selector) { if (selector == undefined) { selector = ".showmore" } $(selector).each(function () { var pagesize = $(this).attr("pagesize") || 10; var $children = $(this).children(); if ($children.length > pagesize) { for (var i = pagesize; i < $children.length; i++) { $children.eq(i).hide(); } $("