我知道這個問題有大量的答案,所有的答案都是一樣的。我想將一個變量傳遞給選擇器。例如 var item = 'size_{{$item->size}}';
$("input[name="+item+"]").change(function() {
console.log('got it');
});
比方說 {{$item->size}} == M // So the var it
我想基於博客帖子的類別以更改的Col-MD-9的背景色 /* makes the colom blue whatever the category */
.cat-md-9 {background-color: blue;}
/* makes only the text area (not the entire colom) of category-A blue */
.category-