I'm using this line of code to try and scroll to an element by its title:
$("#wrapper").animate({scrollTop: $(".placementName[title='" + placementName + "']").offset().top - 10}, "slow");
but the problem is i have few objects in my HTML code with the same title and same class placementName
, how can i ad an id to the rule?
the id is somewebsite.com
so i tried something like:
$("#wrapper").animate({scrollTop:$("#somewebsite.com.placementName[title='" + placementName + "']").offset().top - 10}, "slow");
but it didn't work...any idea? thx