$('#btn').click(function(){
var form = $('#some_form');
var form_id = form.attr('id');
$.ajax({
success: function(){
if(form_id == 666) { alert('Road to HELL!'); }
}
});
});
.scroll_block::-webkit-scrollbar-thumb {
border: 2px solid white;
background-color: #ccc;
}
.scroll_block::-webkit-scrollbar {
-webkit-appearance: none;
}
.scroll_block::-webkit-scrollbar:horizontal {
height: 13px;
}
.scroll_block::-webkit-scrollbar-thumb {
border-radius: 6px;
border: 2px solid white;
background-color: rgba(0, 0, 0, .5);
}
$query= $mysqli->query("select id, name from projects limit 5");
while($project = $query->fetch_assoc()){
$news_query = $mysqli->query("select * from news where `project_id` = {$project[id]} order by `pubdate` desc limit 5");
while($news = $news_query ->fetch_assoc()){
echo $news['title'];
}
}
<img class="youtube_preview" src="preview.png" alt="" data-link="http://youtube.com....." />
$('body').on('click', '.youtbe_preview', function(e){
//меняем iframe на preview
//меняем текущий preview на iframe
});