// elgg friendsPicker jquery plugin // create a separate namespace for each picker - so we can have multiple pickers per page var j = 0; jQuery.fn.friendsPicker = function(settings) { settings = $.extend({ easeFunc: "easeOutExpo", easeTime: 1000, toolTip: false }, settings); return this.each(function() { var container = $(this); container.addClass("friendsPicker"); // set panelwidth manually as it's hidden initially var panelWidth = 755; // count the panels in the container var panelCount = container.find("div.panel").size(); // calculate the width of all the panels lined up end-to-end var friendsPicker_containerWidth = panelWidth*panelCount; // specify width for the friendsPicker_container container.find("div.friendsPicker_container").css("width" , friendsPicker_containerWidth); // global variables for container.each function below var friendsPickerNavigationWidth = 0; var currentPanel = 1; // generate appropriate nav for each container container.each(function(i) { // generate Left and Right arrows $(this).before("
Left<\/div>"); $(this).after("
Right<\/div>"); // generate a-z tabs $(this).before("