I'd like to add some jQuery (for search highlighting) to my Drupal 7 Views with exposed search terms filter. The point is that when a user clicks a search terms (or terms) the jQuery then highlights those words they searched for in the returned results.
I created the following preprocess function in my template.php file:
// add jquery.highlight-5.js just to the search views page
function themename_preprocess_node(&$variables) {
if(arg(0) == 'node' && arg(1) == '8' && arg(3) == null) {
drupal_add_js(drupal_get_path('theme', 'themename') .
'/js/jquery.highlight-5.js');
}
}
But as I put this together I realize I don't know what to put in arg(1) for my Drupal View. Anyone know how to find out the 'nodeid' of the Drupal View?