<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8" /> <script type="text/javascript"> // When the page is ready ================================================== $(document).ready(function() { $('li').each(function(index) { $(this).click( function() { alert("This would trigger => tag_search(" + $(this).attr('id') + ")")}); }); }); </script> </head> <body> Show the ID of the LI clicked <ul> </ul> <?php include_once "../php/codify-function.php"; // Show code ################################################################## codify(file_get_contents(__FILE__), 'html4strict'); ?> </body> </html>