Skip to content

Instantly share code, notes, and snippets.

Mohamed ATATOUSSE atatos

Block or report user

Report or block atatos

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@atatos
atatos / IOS Detection
Created Sep 20, 2013
detect IOS version upper or lower than 5
View IOS Detection
function iOSversion() {
if (/iP(hone|od|ad)/.test(navigator.platform)) {
var v = (navigator.appVersion).match(/OS (\d+)_(\d+)_?(\d+)?/);
return [parseInt(v[1], 10), parseInt(v[2], 10), parseInt(v[3] || 0, 10)];
}
}
var ver = iOSversion();
if (ver && ver[0] <= 5) {
View checkbox.css
.checkbox {
background: url("../img/common/checkbox.png") no-repeat scroll 0 0 transparent;
cursor: pointer;
float: left;
height: 11px;
margin: 0 5px 0 0;
position: relative;
width: 11px;
}
@atatos
atatos / radio.css
Last active Dec 21, 2015
This code can be used for skinned input type radiobutton
View radio.css
.radiobox {
background: url("../img/common/radiobox.png") no-repeat scroll 0 0 transparent;
cursor: pointer;
display: inline-block;
float: left;
height: 11px;
margin: 0 5px 0 0;
position: relative;
width: 11px;
}
@atatos
atatos / Autocomplete JSON & Bold Hightlighted
Created Jul 27, 2013
this is an example of the autocomplete jQuery ui ( JSON & Bold hightlighted)
View Autocomplete JSON & Bold Hightlighted
$("#search-txt").autocomplete({
source: function (req, responseFn) {
$.ajax({
url: "/search.json",
dataType: "json",
success: function(data) {
var re = $.ui.autocomplete.escapeRegex(req.term);
var matcher = new RegExp( "^" + re, "i" );
@atatos
atatos / browser detect
Created Jul 26, 2013
Detecting browsers in jQuery 1.9
View browser detect
//Bring back the browser object
jQuery.browser = {};
//Rest all is self explanatory.
jQuery.browser.mozilla = /mozilla/.test(navigator.userAgent.toLowerCase())
&& !/webkit/.test(navigator.userAgent.toLowerCase());
jQuery.browser.webkit = /webkit/.test(navigator.userAgent.toLowerCase());
jQuery.browser.opera = /opera/.test(navigator.userAgent.toLowerCase());
jQuery.browser.msie = /msie/.test(navigator.userAgent.toLowerCase());
@atatos
atatos / CSS Comment
Created Mar 23, 2013
This is comment for css
View CSS Comment
/* ||||||||||||||||||||||||||||||*/
------------------------------
/* == GLOBAL */
------------------------------
/* ||||||||||||||||||||||||||||||*/
View font-face
@font-face {
font-family: 'MyWebFont';
src: url('webfont.eot'); /* IE9 Compat Modes */
src: url('webfont.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
url('webfont.woff') format('woff'), /* Modern Browsers */
url('webfont.ttf') format('truetype'), /* Safari, Android, iOS */
url('webfont.svg#svgFontName') format('svg'); /* Legacy iOS */
}
@atatos
atatos / HTML5
Last active Dec 15, 2015
HTML5 Structure
View HTML5
<!DOCTYPE html>
<!--[if IE 8 ]> <html lang="fr" class="ie8"> <![endif]-->
<!--[if IE 9 ]> <html lang="fr" class="ie9"> <![endif]-->
<!--[if IE 9 ]> <html lang="fr" class="no-js ie9"> <![endif]-->
<!--[if (gt IE 9)|!(IE)]><!--> <html> <!--<![endif]-->
<head>
<meta charset="utf-8">
<title></title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;">
You can’t perform that action at this time.