Tabbed navigation in widget backend

I checked the markup and core WordPress code to find out how it handles categories and came to the conclusion that all the categories are get loaded on page load and at a time either All Categories or Most Used is displayed by manipulating it using jQuery(on mouse click showing and hiding category-pop & category-all div).

In core wordpress file HTML markup for this is saved in /wp-admin/press-this.php file in #taxonomy-category div and jQuery is saved in /wp-admin/js/link.js file following this // category tabs comment.

By referring his you can develop your widget.