<p onclick="return location.href = 'http://www.yandex.ru/'">Я-ссылачка))</p>
<a onclick="javascript:document.location.href='http://www.yandex.ru/'"> Перейти на главную</a>
$(function() {
$('a[href*=#]:not([href=#])').click(function() {
if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') && location.hostname == this.hostname) {
var target = $(this.hash);
target = target.length ? target : $('[name=' + this.hash.slice(1) +']');
if (target.length) {
$('html,body').animate({
scrollTop: target.offset().top
}, 1000);
return false;
}
}
});
});
<div class="container" ng-app="tabApp">
<div class="row" ng-controller="TabController">
<div class="col-md-2">
<ul class="nav nav-pills nav-stacked">
<li ng-class="{ active: isSet(1) }">
<a href ng-click="setTab(1)">Home</a>
</li>
<li ng-class="{ active: isSet(2) }">
<a href ng-click="setTab(2)">Profile</a>
</li>
<li ng-class="{ active: isSet(3) }">
<a href ng-click="setTab(3)">Messages</a>
</li>
</ul>
</div>
<div class="col-md-8">
<div class="jumbotron">
<div ng-show="isSet(1)">
<h1>Home page</h1>
<p>Welcome to the website!</p>
<p><a class="btn btn-primary btn-lg" role="button">Learn more</a></p>
</div>
<div ng-show="isSet(2)">
<h1>Profile page</h1>
<p>Profile information</p>
</div>
<div ng-show="isSet(3)">
<h1>Messages</h1>
<p> Some messages </p>
</div>
</div>
</div>
</div>
angular.module('tabApp', [])
.controller('TabController', ['$scope', function($scope) {
$scope.tab = 1;
$scope.setTab = function(newTab){
$scope.tab = newTab;
};
$scope.isSet = function(tabNum){
return $scope.tab === tabNum;
};
}]);
<?php
$quotes[] = 'Монета, упавшая на дно реки, может показаться рыбам подарком с неба. Что они будут делать с этим подарком?';
$quotes[] = 'Если увидишь нечто, к чему стоит приложить руку, поступи не так, как подсказывает разум, но как велит настроение.';
$quotes[] = 'Если то, что ты делаешь, трудно тебе - посмотри, нуждаешься ли ты в этом.';
$quotes[] = 'Возможно, твои ошибки - это то, что нужно Миру.';
$quotes[] = 'Всякий может ударить слабого, но только слабый хочет ударить слабого.';
srand ((double) microtime() * 1000000);
$random_number = rand(0,count($quotes)-1);
echo ($quotes[$random_number]);
?>