.fading{
max-height:100px;
overflow:hidden;
margin-top:-20px;
}
.fading:before{
content:"";
display:block;
height:20px;
position:relative;
top:80px;
background-image:linear-gradient(to bottom,rgba(255,255,255,0),#ffffff 75%);
}
http://habrahabr.ru/post/241485/
Необходимо во where сделать выборку по varchar как по int.
В примере в таблице sizes — поле name — varchar, нужно выбрать все строки в которых наименование размера больше 140.
При обычной выборке в результат попадет также, к примеру, 50, т.к. сортировка будет по алфавиту.
Чтобы сделать выборку как для числовых данных используем:
SELECT * FROM sizes WHERE CAST(name AS SIGNED)>='140';
Регистронезависимый поиск по вхождению строки на русском в utf-8 (необходимо указание кодировки)
if(mb_stristr($data_vid_naness_text,'тиснение',false,'utf-8')){
}
article ul,article ol{
list-style-type:none;
counter-reset:num;
margin:0 0 20px 0;
}
article ul li,article ol li{
list-style-type:none;
padding-left:20px;
margin-bottom:4px;
}
article ul li:before,article ol li:before{
color:#ffffff;
background:#ff9300;
border-radius:50%;
padding:0 5px;
text-align:center;
}
article ul li:before{
content:"•";
}
article ol li:before{
content:counter(num);
counter-increment:num;
}
LESS:
.article{
ul,ol{
list-style-type:none;
counter-reset:num;
margin:0 0 20px 0;
li{
list-style-type:none;
padding-left:20px;
margin-bottom:4px;
position:relative;
&:before{
position:absolute;
top:0;
left:0;
color:@color_link;
font-weight:600;
}
}
}
ul li:before{
content:"•";
}
ol li:before{
content:counter(num) ". ";
counter-increment:num;
}
}
Для того чтобы учитывался атрибут start у ol:
$('article ol').each(function(){
var start=parseInt($(this).attr('start'));
if(start>0){
$(this).css('counter-reset','num '+(start-1));
}
});
Сделать что либо с элементом зная его атрибут, например
<div data-u="slides"></div>
$('div[data-u=slides]').width(window_width+'px');