.content-inner {
width: 300px;
height:300px;
background: #FFF;
box-shadow: 0 1px 2px rgba(0,0,0,0.2);
position:relative;
}
.content-inner::before {
content: "";
display: block;
border: 11px solid transparent;
border-right-color: #DDD;
position: absolute;
top: 47px;
left: -22px;
}
.content-inner::after {
content: "";
display: block;
border: 10px solid transparent;
border-right-color: #FFF;
position: absolute;
top: 48px;
left: -20px;
}
<ul>
<li>1</li>
<li>2</li>
<li>3</li>
<li>4</li>
</ul>
var session = {
'list': []
};
$('ul').children().each(function(i,v){
session.list.push({ 'id': i, 'value': $(v).text()});
});
localStorage.setItem('session', JSON.stringify(session));
var restoredSession = JSON.parse(localStorage.getItem('session'));
var express = require('express')
, routes = require('./routes')
, lessMiddleware = require('less-middleware')
, http = require('http')
, path = require('path');
var app = express();
app.configure(function () {
app.set('port', process.env.PORT || 80);
app.set('views', __dirname + '/views');
app.set('view engine', 'jade');
app.use(express.favicon());
app.use(express.logger('dev'));
app.use(express.bodyParser());
app.use(express.methodOverride());
app.use(app.router);
app.use(lessMiddleware(__dirname + '/public'));
app.use(express.static(path.join(__dirname, 'public')));
});
app.configure('development', function () {
app.use(express.errorHandler());
});
app.get('/', routes.index);
doctype 5
html
head
block meta
title= title
link(rel='stylesheet', href='stylesheets/layout.css')
link(rel='stylesheet', href='stylesheets/css.css')
script(src='javascripts/jquery.js')
script(src='javascripts/ajax.js')
script(src='javascripts/progress.js')
script(src='javascripts/moment.js')
script(src='javascripts/livestamp.js')
body
section
block header
block content
block footer
link(rel='stylesheet', href='stylesheets/layout.css')
link(rel='stylesheet', href='stylesheets/css.css')
<link rel="stylesheet/less" type="text/css" href="styles.less" />
<script src="less.js" type="text/javascript"></script>
function getCoords(nameId,nameObj){
var coord=nameId.getBoundingClientRect();
return nameObj={
top:coord.top,
left:coord.left,
bottom:coord.bottom,
right:coord.right
}
.span12использует фиксированную ширину ? Так же настройте сайт под разные размеры экрана и избавьтесь от фиксированных значений.
@media screen and (max-width: 980px) {
#pagewrap {
width: 95%;
}
#content {
width: 60%;
padding: 3% 4%;
}
#sidebar {
width: 30%;
}
#sidebar .widget {
padding: 8% 7%;
margin-bottom: 10px;
}
}
xhr.setRequestHeader('Content-type', 'application/json; charset=utf-8');
xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded')
xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded; charset=utf-8')
var e = $('#number').text();
e > 1 ? fun1() : fun2(); // тернерная операция , аналогична if-else
fun1(){
var mydiv = $('<div/>', {
id: 'mydiv',
class: 'mydiv',
text: 'Содержимое блока уведомления'
});
$('.content').append(mydiv);
} // выполняется функция если e > 1
fun2(){
} // выполняется функция если e < 1 или e = 1
setInterval(myF(), 300);
function myF(){
// return $('#demo2').text();
// var a = $('#demo2').text();
// return $('#demo2').html();
// var a = $('#demo2').html();
}
jQuery("ELEMENT").bind( 'DOMSubtreeModified',function(){ // отслеживаем изменение содержимого
//Some function
});
<div class="pp_overlay" style="width: 1943px; height: 2045px; display: block; opacity: 0.8;"></div>
/*media all*/
div.pp_overlay {
background: #000;
display: none;
left: 0px;
position: absolute;
top: 0px;
width: 100%;
z-index: 9500;
}
.prettyPhoto.initialize = function() {
settings = s;
if (settings.theme == "pp_default") settings.horizontal_padding = 16;
theRel = e(this).attr(settings.hook);
galleryRegExp = /\[(?:.*)\]/;
isSet = galleryRegExp.exec(theRel) ? true : false;
pp_images = isSet ? jQuery.map(o, function(t, n) {
if (e(t).attr(settings.hook).indexOf(theRel) != -1) return e(t).attr("href")
}) : e.makeArray(e(this).attr("href"));
pp_titles = isSet ? jQuery.map(o, function(t, n) {
if (e(t).attr(settings.hook).indexOf(theRel) != -1) return e(t).find("img").attr("alt") ? e(t).find("img").attr("alt") : ""
}) : e.makeArray(e(this).find("img").attr("alt"));
pp_descriptions = isSet ? jQuery.map(o, function(t, n) {
if (e(t).attr(settings.hook).indexOf(theRel) != -1) return e(t).attr("title") ? e(t).attr("title") : ""
}) : e.makeArray(e(this).attr("title"));
if (pp_images.length > settings.overlay_gallery_max) settings.overlay_gallery = false;
set_position = jQuery.inArray(e(this).attr("href"), pp_images);
rel_index = isSet ? set_position : e("a[" + settings.hook + "^='" + theRel + "']").index(e(this));
k(this);
if (settings.allow_resize) e(window).bind("scroll.prettyphoto", function() {
x()
});
e.prettyPhoto.open();
return false
}
function() {
if (!settings.modal) e.prettyPhoto.close()
}