Nikolay37, вот так выглядят тестовые примеры.
<!DOCTYPE html>
<html>
<head>
<meta http-equiv='Content-Type' content='text/html; charset=windows-1251' />
<script src='https://code.jquery.com/jquery-latest.js'></script>
<!--
<script src="https://code.angularjs.org/1.3.9/angular.min.js"></script>
<script src="https://code.angularjs.org/1.3.9/angular-route.js"></script>
-->
<style type='text/css'>
</style>
<script type='text/javascript'>
$(function(){
$('.name').click(function(){
alert(this.innerHTML);
});
var arr=[
'AK-47 | Case Hardened (Field-Tested)',
'AWP | Man-o\'-war (Minimal Wear)'
];
var o=document.querySelectorAll('.name');
for (var i=0; i<arr.length; i++) {
for (var j=0; j<o.length; j++) {
if (o[j].innerHTML==arr[i]) {
o[j].click();
};
};
};
});
</script>
</head>
<body>
<div id="items">
<div class="scrollbar">
<div class="item">
<span class="name">★ M9 Bayonet | Bright Water (Factory New)</span>
</div>
<div class="item">
<span class="name">★ Falchion Knife | Blue Steel (Field-Tested)</span>
</div>
<div class="item">
<span class="name">AWP | Man-o'-war (Minimal Wear)</span>
</div>
<div class="item">
<span class="name">AWP | Man-o'-war (Minimal Wear)</span>
</div>
<div class="item">
<span class="name">AK-47 | Case Hardened (Field-Tested)</span>
</div>
</div>
</div>
</body>
</html>