JavaScript
// looking for an element by attribute & attribute value
var elem = $("[my='123a']");
// looking for an element by tag & attribute & attribute value
var elem = $("div[my='123a']");
// looking for an element by class & attribute & attribute value
var elem = $(".eee[my='123a']");
Html
<html>
<!-- heading -->
<head>
<meta charset="utf-8">
<title>Example</title>
</head>
<!-- page -->
<body>
<!-- connect the library jQuery -->
<script src="https://dir.by/example_lib/jquery/jquery-3.3.1.min.js"></script>
<!-- HTML Elements -->
<div class='eee' my="123a">
Hello
</div>
<!-- JavaScript -->
<script>
// the page has opened
$( function()
{
// looking for an element by attribute & attribute value
var elem = $("[my='123a']");
// show the item on the screen
alert(elem.html());
// looking for an element by tag & attribute & attribute value
var elem = $("div[my='123a']");
// show the item on the screen
alert(elem.html());
// looking for an element by class & attribute & attribute value
var elem = $(".eee[my='123a']");
// show the item on the screen
alert(elem.html());
});
</script>
</body>
</html>