Сообщение от Moze
|
При клике на эту картинку как раз спарсить название предмета, которое в div
|
Как вариант...
<!DOCTYPE html>
<html>
<head>
<meta http-equiv='Content-Type' content='text/html; charset=windows-1251' />
<script src='http://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(){
$('.additemon > img').click(function(){
alert($(this.parentNode).next().text());
});
});
</script>
</head>
<body>
<div class="item item-1">
<a class="additemon" onclick="$('#placeitem1').arcticmodal()">
<img src="http://steamcommunity.com/economy/image/-9a81dlWLwJ2UUGcVs_nsVtzdOEdtWwKGZZLQHTxDZ7I56KU0Zwwo4NUX4oFJZEHLbXU5A1PIYQNqhpOSV-fRPasw8rsUFJ5KBFZv668FFAuhqSaKWtEu43mxtbbk6b1a77Twm4Iu8Yl3bCU9Imii1Xt80M5MmD7JZjVLFH-6VnQJQ" width="115px" height="85px">
</a>
<div class="itemname">Chroma 2 Case</div>
</div>
<div class="item item-2">
<a class="additemon" onclick="$('#placeitem1').arcticmodal()">
<img src="http://steamcommunity.com/economy/image/-9a81dlWLwJ2UUGcVs_nsVtzdOEdtWwKGZZLQHTxDZ7I56KU0Zwwo4NUX4oFJZEHLbXH5ApeO4YmlhxYQknCRvCo04DEVlxkKgpopb3wflFfwOP3ZTxS6eOym5SYqOD1Jb7CqWZU7Mxkh6fFrIrw0AHir0U4NT-gcIGXcgJvNFDT_VS2yeq-g8S87cucmiRm7HJ2-z-DyDnl3q6r" width="115px" height="85px">
</a>
<div class="itemname">SSG</div>
</div>
<div class="item item-3">
<a class="additemon" onclick="$('#placeitem1').arcticmodal()">
<img src="http://steamcommunity.com/economy/image/-9a81dlWLwJ2UUGcVs_nsVtzdOEdtWwKGZZLQHTxDZ7I56KU0Zwwo4NUX4oFJZEHLbXH5ApeO4YmlhxYQknCRvCo04DEVlxkKgpopL-zJAt21uH3Yi19-N2mkb-DkvbiKvWFwG5XvZRy3-zEpY2m2gGx80Zqam72IIDGclVsZg7YrlC4lLu91pHvot2XnhhDUpSw" width="115px" height="85px">
</a>
<div class="itemname">Revolver</div>
</div>
</body>
</html>