<a class=”hamburger menu-btn” href=”javascript:void(0)”><span></span></a> <div class=”main-menu-wrap”> <div class=”main-menu”> <a href=”#”>Home</a> <a href=”#”>About Us</a> <a href=”#”>Services</a> <a href=”#”>Blog</a> <a href=”#”>Get in Touch</a> </div> </div> $(function(){ var clicked = 0; $(‘.menu-btn’).click(function(e){ var screen_height = $(window).height() – $(‘.mob-header’).height(); $(this).toggleClass(‘active’); $(‘body’).toggleClass(‘menu-active’); if (clicked == 0) { $(‘.main-menu-wrap’).height(screen_height); clicked = 1; return; } if (clicked == 1) { $(‘.main-menu-wrap’).removeAttr(‘style’); clicked […]
Category: Html
Görseli Siyah-Beyaz Yapma
<img src=”image.jpg” alt=”Black and White” class=”blackandwhite”> .blackandwhite { filter: gray; filter: grayscale(100%); }
HTML5 Desktop Notification
<input type=”button” id=”push_notification_button” value=”Push Notification”> <script> $(document).ready(function(){ // push_notification fonksiyonu function push_notification(baslik,icerik,resim,url) { // bildirim opsiyonları var options = { body: icerik, icon: resim, dir : “ltr” }; // bildirim opsiyonları if (!(“Notification” in window)) { // Tarayıcı bildirim özelliğini destekliyor mu? alert(“Tarayıcınız bildirim özelliğini desteklememektedir!”); }else if (Notification.permission === “granted”) { // Daha önce […]
No-Cache Meta
PHP header(‘Cache-Control: no-cache, no-store, must-revalidate’); // HTTP 1.1. header(‘Pragma: no-cache’); // HTTP 1.0. header(‘Expires: 0′); // Proxies. Java Servlet response.setHeader(“Cache-Control”, “no-cache, no-store, must-revalidate”); // HTTP 1.1. response.setHeader(“Pragma”, “no-cache”); // HTTP 1.0. response.setDateHeader(“Expires”, 0); // Proxies. ASP.NET Response.AppendHeader(“Cache-Control”, “no-cache, no-store, must-revalidate”); // HTTP 1.1. Response.AppendHeader(“Pragma”, “no-cache”); // HTTP 1.0. Response.AppendHeader(“Expires”, “0″); // Proxies. ASP Response.addHeader “Cache-Control”, […]
Image Resize
<form name=”frmImageResize” action=”” method=”post” enctype=”multipart/form-data”> <input type=”file” name=”myImage” /> <input type=”submit” name=”submit” value=”Submit” /> </form> <?php if(isset($_POST["submit"])) { if(is_array($_FILES)) { $file = $_FILES['myImage']['tmp_name']; $source_properties = getimagesize($file); $image_type = $source_properties[2]; if($image_type == IMAGETYPE_JPEG) { $image_resource_id = imagecreatefromjpeg($file); $target_layer = fn_resize($image_resource_id,$source_properties[0],$source_properties[1]); imagejpeg($target_layer,$_FILES['myImage']['name'] . “_thump.jpg”); } elseif($image_type == IMAGETYPE_GIF) { $image_resource_id = imagecreatefromgif($file); $target_layer = fn_resize($image_resource_id,$source_properties[0],$source_properties[1]); imagegif($target_layer,$_FILES['myImage']['name'] . […]
Parola Zorluk Seviyesi Kontrolü
<div name=”frmCheckPassword” id=”frmCheckPassword”> <label>Check Username:</label> <input type=”password” name=”password” id=”password” class=”demoInputBox” onKeyUp=”checkPasswordStrength();” /><div id=”password-strength-status”></div> </div> function checkPasswordStrength() { var number = /([0-9])/; var alphabets = /([a-zA-Z])/; var special_characters = /([~,!,@,#,$,%,^,&,*,-,_,+,=,?,>,<])/; if($(‘#password’).val().length<6) { $(‘#password-strength-status’).removeClass(); $(‘#password-strength-status’).addClass(‘weak-password’); $(‘#password-strength-status’).html(“Weak (should be atleast 6 characters.)”); } else { if($(‘#password’).val().match(number) && $(‘#password’).val().match(alphabets) && $(‘#password’).val().match(special_characters)) { $(‘#password-strength-status’).removeClass(); $(‘#password-strength-status’).addClass(‘strong-password’); $(‘#password-strength-status’).html(“Strong”); } else { $(‘#password-strength-status’).removeClass(); […]
Check-Uncheck All Butonu Yapma
<div id=”divCheckAll”> <input type=”checkbox” name=”checkall” id=”checkall” onClick=”check_uncheck_checkbox(this.checked);” />Check All</div> <div id=”divCheckboxList”> <div class=”divCheckboxItem”><input type=”checkbox” name=”language” id=”language1″ value=”English” />English</div> <div class=”divCheckboxItem”><input type=”checkbox” name=”language” id=”language2″ value=”French” />French</div> <div class=”divCheckboxItem”><input type=”checkbox” name=”language” id=”language3″ value=”German” />German</div> <div class=”divCheckboxItem”><input type=”checkbox” name=”language” id=”language4″ value=”Latin” />Latin</div> </div> function check_uncheck_checkbox(isChecked) { if(isChecked) { $(‘input[name="language"]‘).each(function() { this.checked = true; }); } else { $(‘input[name="language"]‘).each(function() […]
Cookie ile Tek Gösterimlik PopUp Hazırlama
Aşağıdaki linkte verdiğimiz popup için yazdığımız html kodlarını kullanacağız. https://coding.emretalu.net/bootstrap-popup/ var cookie_value = 0; function get_cookie(name){ var cookie_name = name + “=”; if (document.cookie.length > 0){ start_index = document.cookie.indexOf(cookie_name); if (start_index != -1) { start_index += cookie_name.length; end_index = document.cookie.indexOf(“;”, start_index); if (end_index == -1){ end_index = document.cookie.length; } cookie_value=unescape(document.cookie.substring(start_index, end_index)); } } if(cookie_value == […]
Bootstrap PopUp
<a class=”btn” data-toggle=”modal” href=”#myModal” >Launch PopUp</a> <div class=”modal hide fade” id=”myModal”> <div class=”modal-header”> <a class=”close” data-dismiss=”modal”>×</a> <h3>Modal header</h3> </div> <div class=”modal-body”> <p>One fine body…</p> </div> <div class=”modal-footer”> <a href=”#” class=”btn”>Close</a> <a href=”#” class=”btn btn-primary”>Save changes</a> </div> </div> $(document).ready(function(){ setTimeout(function() { $(‘#myModal’).modal({ backdrop: true, keyboard: true, show: true }); }, 1500); });
Özel Karakterler (ASCII/HTML/URL)
Sitelerinizde ihtiyaç duyacağınız özel karakterler için şu site çok hoş: http://web.forret.com/tools/charmap.asp?show=ascii