HTML
- 3 ответа
- 0 вопросов
2
Вклад в тег
CURLOPT_RETURNTRANSFER => true,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_RETURNTRANSFER => true,
private function setOptions(){
if(empty($this->options))
{
$this->options = array(
CURLOPT_AUTOREFERER => true,
CURLOPT_COOKIESESSION => false,
CURLOPT_HTTPGET => true,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_BINARYTRANSFER => true,
CURLOPT_ENCODING => 'gzip,deflate,sdch',
CURLOPT_HTTPHEADER => array(
'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
'Accept-Charset: windows-1251,utf-8;q=0.7,*;q=0.3',
'Accept-Language: ru-RU,ru;q=0.8,en-US;q=0.6,en;q=0.4',
'Cache-Control: max-age=0'
),
CURLOPT_USERAGENT => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_2) AppleWebKit/535.7 (KHTML, like Gecko) Chrome/16.0.912.75 Safari/535.7'
);
if($this->cookie){
$this->options[CURLOPT_COOKIEFILE] = "cookie.txt";
$this->options[CURLOPT_COOKIEJAR] = "cookie.txt";
}
}
}
<ul>
<li class="btn"></li>
<li class="btn"></li>
<li class="btn"></li>
<li class="btn"></li>
</ul>
.btn {display: inline-block; width: 100px; height: 20px; margin: 0;}
.btn.active {margin-left: 5px;}
$('.btn').click(function(){
$('.btn').removeClass('ative'); //Возвращаем все кнопки на место
$(this).addClass('active'); //Двигаем нужную кнопку
})