function isemail(test_text){
var flag = false;
if (/.([a-z0-9_\.-]+)@([a-z0-9_\.-]+)\.([a-z\.]{2,6})./.test(test_text)) {
flag = true;
} else {
flag = false;
}
return flag;
}
function islink(test_text){
var flag = false;
if (/.([a-zA-Z0-9]([-a-zA-Z0-9]{0,61}[a-zA-Z0-9])?\.)?([a-zA-Z0-9]{1,2}([-a-zA-Z0-9]{0,252}[a-zA-Z0-9])?)\.([a-zA-Z]{2,63})./.test(test_text)) {
flag = true;
} else {
flag = false;
}
return flag;
}
if( $curl = curl_init() ) {
curl_setopt($curl,CURLOPT_URL,'http://cloud-2.steamusercontent.com/ugc/595875981210444362/9A00660FD2A7B2AD9EBBAE480CAFDCC4555E8663/');
curl_setopt($curl,CURLOPT_RETURNTRANSFER,true);
curl_setopt($curl,CURLOPT_NOBODY,true);
curl_setopt($curl,CURLOPT_HEADER,true);
$out = curl_exec($curl);
echo $out;
curl_close($curl);
}
$(".element").click(function(){
$(".inputclass").val($(".inputclass").val()-1);
//$(".inputclass").val($(".inputclass").val()+1);
});
<input class="element" value="+" operation="+">
<input class="element" value="-" operation="-">
$(".element").click(function(){
if($(this).attr('operation') == '+'){
$(".inputclass").val($(".inputclass").val()+1);
}else if($(this).attr('operation') == '-'){
$(".inputclass").val($(".inputclass").val()-1);
}
});
$(document).ready(function(){
var headline = document.querySelector('.trigger-headline'),
trigger = document.querySelector('.btn--trigger'),
segmenter = new Segmenter(document.querySelector('.segmenter'), {
onReady: function() {
trigger.classList.remove('btn--hidden');
trigger.addEventListener('click', function() {
segmenter.animate();
headline.classList.remove('trigger-headline--hidden');
this.classList.add('btn--hidden');
});
}
});
});
$test = array();
foreach($products as $product){
$test[] = array(
"id"=>$product->id,
"title"=>$product->title,
"param"=>array(
"param1"=>21,
"param2"=>2,
),
);
}
echo json_encode($test);