如何找到元素的 id 等于变量值?
$('.el'[id="var"]) 不起作用..
$('.a').hover(function(){
var current_id = $(this).attr('id'); // console.log(current_id);
$('.b[id="current_id"]').css({'font-size':'22px'}); // not work
// console.log($('.b')); get[<div class="b" id="0">0</div> , <div class="b" id="1">1</div> , <div class="b" id="2">2</div>]
}, function(){
});
html
<div class="a" id="0">0</div>
<div class="b" id="0">0</div>
<div class="b" id="1">1</div>
<div class="b" id="2">2</div>
...