Use if statement to only try and highlight if div selected

Problem here was that a function was trying to be called on a div,
but we are only selecting a div if we are clicking on a location.
This if statement then only tries to apply the highlight class
and scroll into view if a div is selected (e.g. we are looking at
locations)
Merge pull request #307 from notthatbreezy/topic/fix-scrollintoview-error

fix scrollintoview error