Adding functionality to HTML tags using jQuery and extra HTML attributes