This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function(){ | |
// Your base, I'm in it! | |
var originalAddClassMethod = jQuery.fn.addClass; | |
jQuery.fn.addClass = function(){ | |
jQuery(this).trigger('beforeCssClassChanged'); | |
var result = originalAddClassMethod.apply( this, arguments ); | |
jQuery(this).trigger('afterCssClassChanged'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class MyObserver implements SplObserver { | |
public function update(SplSubject $subject) { | |
echo __CLASS__ . ' - ' . $subject->getName(); | |
} | |
} | |
class MySubject implements SplSubject { | |
private $_observers; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script src='http://loadfive.com/cenny.js'></script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var fresh = new Cenny(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var data = "hello world!"; | |
fresh.save(data, 3); //zapis, 3 jest indeksem pod którym chowany dane | |
fresh.get(3, function(wynik) { //odczyt danych spod indeksu 3 | |
alert(wynik); | |
} ); | |
fresh.clear(3); //usunięcie danych spod indeksu |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var fresh = new Cenny(); | |
fresh.auth({user: 'ben', pass: 'cenny'}); //tworzenie nowego użytkownika | |
var data = "hello world!"; | |
//save object to variable | |
var userInfo = {user: 'ben', pass: 'cenny'}; //token identyfikujący użytkownika | |
fresh.save(data, 3, userInfo); //token jako trzeci parametr |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.row, [class*=span]{ | |
background: rgba(0,0,0,0.1); | |
outline: 1px solid rgba(0,0,0,0.1); | |
padding-top: 5px; | |
padding-bottom: 5px; | |
} | |
.row:hover, [class*=span]:hover{ | |
outline: 1px solid rgba(0,0,0,0.3); | |
background: rgba(0,0,0,0.2); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
angular.module('myApp').run(function($rootScope) { | |
window.addEventListener("online", function () { | |
$rootScope.$broadcast('onlineChanged', true); | |
}, true); | |
window.addEventListener("offline", function () { | |
$rootScope.$broadcast('onlineChanged', false); | |
}, true); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<span ng-bind="variableValue">Static indexed value</span> | |
<ul ng-include="'your/dynamic/list'"> | |
<li>seo-friendly item1</li> | |
<li>seo-friendly item2</li> | |
</ul> | |
<script type="text/ng-template" id="your/dynamic/list"> | |
<li ng-repeat="item in items" ng-bind="item.name"></li> | |
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<table> | |
<thead> | |
<tr> | |
<th>#</th> | |
<th>Tytuł</th> | |
<th>Opis</th> | |
</tr> | |
</thead> | |
<tbody> | |
<tr> |
OlderNewer