Text inside a div that is 200 pixels wide looks like this. Text inside a div that is 200 pixels wide looks like this. Text inside a div that is 200 pixels wide looks like this. Text inside a div that is 200 pixels wide looks like this. Text inside a div that is 200 pixels wide looks like this. Text inside a div that is 200 pixels wide looks like this. Text inside a div that is 200 pixels wide looks like this. Text inside a div that is 200 pixels wide looks like this. Text inside a div that is 200 pixels wide looks like this. Text inside a div that is 200 pixels wide looks like this.
35 | Text inside a div that is 400 pixels wide looks like this. Text inside a div that is 400 pixels wide looks like this. Text inside a div that is 400 pixels wide looks like this. Text inside a div that is 400 pixels wide looks like this. Text inside a div that is 400 pixels wide looks like this. Text inside a div that is 400 pixels wide looks like this. Text inside a div that is 400 pixels wide looks like this. Text inside a div that is 400 pixels wide looks like this. Text inside a div that is 400 pixels wide looks like this. Text inside a div that is 400 pixels wide looks like this. Text inside a div that is 400 pixels wide looks like this. Text inside a div that is 400 pixels wide looks like this. Text inside a div that is 400 pixels wide looks like this. Text inside a div that is 400 pixels wide looks like this. Text inside a div that is 400 pixels wide looks like this. Text inside a div that is 400 pixels wide looks like this. Text inside a div that is 400 pixels wide looks like this. Text inside a div that is 400 pixels wide looks like this. Text inside a div that is 400 pixels wide looks like this. Text inside a div that is 400 pixels wide looks like this. Text inside a div that is 400 pixels wide looks like this. Text inside a div that is 400 pixels wide looks like this.
36 | Text inside a div that is 600 pixels wide looks like this. Text inside a div that is 600 pixels wide looks like this. Text inside a div that is 600 pixels wide looks like this. Text inside a div that is 600 pixels wide looks like this. Text inside a div that is 600 pixels wide looks like this. Text inside a div that is 600 pixels wide looks like this. Text inside a div that is 600 pixels wide looks like this. Text inside a div that is 600 pixels wide looks like this. Text inside a div that is 600 pixels wide looks like this. Text inside a div that is 600 pixels wide looks like this. Text inside a div that is 600 pixels wide looks like this. Text inside a div that is 600 pixels wide looks like this. Text inside a div that is 600 pixels wide looks like this. Text inside a div that is 600 pixels wide looks like this. Text inside a div that is 600 pixels wide looks like this. Text inside a div that is 600 pixels wide looks like this. Text inside a div that is 600 pixels wide looks like this. Text inside a div that is 600 pixels wide looks like this. Text inside a div that is 600 pixels wide looks like this. Text inside a div that is 600 pixels wide looks like this. Text inside a div that is 600 pixels wide looks like this. Text inside a div that is 600 pixels wide looks like this. Text inside a div that is 600 pixels wide looks like this. Text inside a div that is 600 pixels wide looks like this. Text inside a div that is 600 pixels wide looks like this. Text inside a div that is 600 pixels wide looks like this. Text inside a div that is 600 pixels wide looks like this. Text inside a div that is 600 pixels wide looks like this. Text inside a div that is 600 pixels wide looks like this. Text inside a div that is 600 pixels wide looks like this. Text inside a div that is 600 pixels wide looks like this. Text inside a div that is 600 pixels wide looks like this. Text inside a div that is 600 pixels wide looks like this.
--------------------------------------------------------------------------------
/AirBackup/jaxer_bin/css/style.css:
--------------------------------------------------------------------------------
1 | /*
2 | * Definicje wyglądu aplikacji AirBackup 1.1
3 | * (c) javascript-html5-tutorial.pl
4 | */
5 |
6 | .clear {
7 | clear: both;
8 | }
9 |
10 | #my-window {
11 | width: 540px;
12 | height: 340px;
13 | background-color: #fff;
14 | border: 1px outset #00d;
15 | overflow: hidden;
16 | -webkit-border-radius: 10px;
17 | }
18 |
19 | #app-label {
20 | float: left;
21 | padding: 4px;
22 | cursor: move;
23 | }
24 |
25 | #top-bar {
26 | height: 30px;
27 | border-bottom: 1px solid #00a;
28 | text-align: right;
29 | padding: 2px 8px 0 4px;
30 | cursor: move;
31 | }
32 |
33 | #top-bar a {
34 | font-weight: bold;
35 | color: #f00;
36 | text-decoration: none;
37 | line-height: 30px;
38 | }
39 |
40 | #files {
41 | list-style-type: square;
42 | float: left;
43 | width: 300px;
44 | height: 200px;
45 | overflow: auto;
46 | padding: 5px;
47 | font-size: 9px;
48 | }
49 |
50 | #drop-area {
51 | float: left;
52 | width: 500px;
53 | height: 90px;
54 | border: 1px solid #00d;
55 | background-color: #efe;
56 | margin: 10px;
57 | padding-top: 10px;
58 | padding-left: 10px;
59 | font-size: 8pt;
60 | }
61 |
62 | #control-area {
63 | cursor: pointer;
64 | float: right;
65 | padding: 10px
66 | }
67 |
68 | #info {
69 | padding: 8px 0 4px 8px;
70 | font-size: 9pt;
71 | }
72 |
--------------------------------------------------------------------------------
/AirBackup/jaxer_bin/fileupload.php:
--------------------------------------------------------------------------------
1 |
37 |
--------------------------------------------------------------------------------
/AirBackup/jaxer_bin/icons/AIRApp_128.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dominik-w/js_html5_com/585e6dcec10aea8e81ea76d759ef9ace64238379/AirBackup/jaxer_bin/icons/AIRApp_128.png
--------------------------------------------------------------------------------
/AirBackup/jaxer_bin/icons/AIRApp_16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dominik-w/js_html5_com/585e6dcec10aea8e81ea76d759ef9ace64238379/AirBackup/jaxer_bin/icons/AIRApp_16.png
--------------------------------------------------------------------------------
/AirBackup/jaxer_bin/icons/AIRApp_32.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dominik-w/js_html5_com/585e6dcec10aea8e81ea76d759ef9ace64238379/AirBackup/jaxer_bin/icons/AIRApp_32.png
--------------------------------------------------------------------------------
/AirBackup/jaxer_bin/icons/AIRApp_48.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dominik-w/js_html5_com/585e6dcec10aea8e81ea76d759ef9ace64238379/AirBackup/jaxer_bin/icons/AIRApp_48.png
--------------------------------------------------------------------------------
/AirBackup/jaxer_bin/icons/ajax_s.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dominik-w/js_html5_com/585e6dcec10aea8e81ea76d759ef9ace64238379/AirBackup/jaxer_bin/icons/ajax_s.gif
--------------------------------------------------------------------------------
/AirBackup/jaxer_bin/lib/myapp.js:
--------------------------------------------------------------------------------
1 | /**
2 | * AirBackup 1.1
3 | * (c) Dominik Wlazłowski
4 | * www.javascript-html5-tutorial.pl
5 | */
6 |
7 | /** config **/
8 |
9 | // adres docelowy
10 | const SERVER_URL = "http://www.directcode.eu/airbackup/processor.php";
11 |
12 | // maksymalna ilość plików, jaką możemy wysłać jednorazowo
13 | const FILES_MAX_AMOUNT = 10;
14 |
15 | /** koniec: config **/
16 |
17 | $(document).ready(function() {
18 | // przeciąganie okna chwytając za element top-bar
19 | $("#top-bar").mousedown(function() {
20 | window.nativeWindow.startMove();
21 | });
22 |
23 | // zamykanie aplikacji
24 | $("#app-close").click(function() {
25 | window.nativeWindow.close();
26 | return false;
27 | });
28 | });
29 |
30 | // nazwy plików
31 | var backupFileNames = new Array();
32 |
33 | // tablica obiektów typu File
34 | var backupFiles = new Array();
35 |
36 | // funkcje obsługi zdarzeń
37 |
38 | function handleDragEnter(event) {
39 | event.preventDefault();
40 | }
41 |
42 | function handleDragOver(event) {
43 | event.preventDefault();
44 | }
45 |
46 | function handleDrop(event) {
47 |
48 | // kontrola ilości plików do jednorazowego wysłania
49 | if (backupFiles.length >= FILES_MAX_AMOUNT) {
50 | alert('Wyślij bieżące pliki. Limit jednego pakietu wynosi '
51 | + FILES_MAX_AMOUNT);
52 |
53 | return;
54 | }
55 |
56 | // budujemy listę plików
57 | var fileList = event.dataTransfer.getData(air.ClipboardFormats.FILE_LIST_FORMAT);
58 |
59 | for (var i in fileList) {
60 | if ($.inArray(fileList[i].name, backupFileNames) == -1) {
61 | backupFileNames.push(fileList[i].name);
62 | backupFiles.push(fileList[i]);
63 | $("#files ul").append('");
136 | });
137 | }
138 |
139 | $(mainBoard + " div").click(openCard);
140 | shuffleImgs();
141 |
142 | });
143 |
--------------------------------------------------------------------------------
/halloween-memory-game/js/prefixfree.min.js:
--------------------------------------------------------------------------------
1 | !function(){function e(e,r){return[].slice.call((r||document).querySelectorAll(e))}if(window.addEventListener){var r=window.StyleFix={link:function(e){try{if("stylesheet"!==e.rel||e.hasAttribute("data-noprefix"))return}catch(t){return}var n,i=e.href||e.getAttribute("data-href"),a=i.replace(/[^\/]+$/,""),o=(/^[a-z]{3,10}:/.exec(a)||[""])[0],s=(/^[a-z]{3,10}:\/\/[^\/]+/.exec(a)||[""])[0],l=/^([^?]*)\??/.exec(i)[1],u=e.parentNode,p=new XMLHttpRequest;p.onreadystatechange=function(){4===p.readyState&&n()},n=function(){var t=p.responseText;if(t&&e.parentNode&&(!p.status||p.status<400||p.status>600)){if(t=r.fix(t,!0,e),a){t=t.replace(/url\(\s*?((?:"|')?)(.+?)\1\s*?\)/gi,function(e,r,t){return/^([a-z]{3,10}:|#)/i.test(t)?e:/^\/\//.test(t)?'url("'+o+t+'")':/^\//.test(t)?'url("'+s+t+'")':/^\?/.test(t)?'url("'+l+t+'")':'url("'+a+t+'")'});var n=a.replace(/([\\\^\$*+[\]?{}.=!:(|)])/g,"\\$1");t=t.replace(RegExp("\\b(behavior:\\s*?url\\('?\"?)"+n,"gi"),"$1")}var i=document.createElement("style");i.textContent=t,i.media=e.media,i.disabled=e.disabled,i.setAttribute("data-href",e.getAttribute("href")),u.insertBefore(i,e),u.removeChild(e),i.media=e.media}};try{p.open("GET",i),p.send(null)}catch(t){"undefined"!=typeof XDomainRequest&&(p=new XDomainRequest,p.onerror=p.onprogress=function(){},p.onload=n,p.open("GET",i),p.send(null))}e.setAttribute("data-inprogress","")},styleElement:function(e){if(!e.hasAttribute("data-noprefix")){var t=e.disabled;e.textContent=r.fix(e.textContent,!0,e),e.disabled=t}},styleAttribute:function(e){var t=e.getAttribute("style");t=r.fix(t,!1,e),e.setAttribute("style",t)},process:function(){e("style").forEach(StyleFix.styleElement),e("[style]").forEach(StyleFix.styleAttribute)},register:function(e,t){(r.fixers=r.fixers||[]).splice(void 0===t?r.fixers.length:t,0,e)},fix:function(e,t,n){for(var i=0;i
-1&&(e=e.replace(/(\s|:|,)(repeating-)?linear-gradient\(\s*(-?\d*\.?\d*)deg/gi,function(e,r,t,n){return r+(t||"")+"linear-gradient("+(90-n)+"deg"})),e=r("functions","(\\s|:|,)","\\s*\\(","$1"+i+"$2(",e),e=r("keywords","(\\s|:)","(\\s|;|\\}|$)","$1"+i+"$2$3",e),e=r("properties","(^|\\{|\\s|;)","\\s*:","$1"+i+"$2:",e),t.properties.length){var a=RegExp("\\b("+t.properties.join("|")+")(?!:)","gi");e=r("valueProperties","\\b",":(.+?);",function(e){return e.replace(a,i+"$1")},e)}return n&&(e=r("selectors","","\\b",t.prefixSelector,e),e=r("atrules","@","\\b","@"+i+"$1",e)),e=e.replace(RegExp("-"+i,"g"),"-"),e=e.replace(/-\*-(?=[a-z]+)/gi,t.prefix)},property:function(e){return(t.properties.indexOf(e)?t.prefix:"")+e},value:function(e){return e=r("functions","(^|\\s|,)","\\s*\\(","$1"+t.prefix+"$2(",e),e=r("keywords","(^|\\s)","(\\s|$)","$1"+t.prefix+"$2$3",e)},prefixSelector:function(e){return e.replace(/^:{1,2}/,function(e){return e+t.prefix})},prefixProperty:function(e,r){var n=t.prefix+e;return r?StyleFix.camelCase(n):n}};!function(){var e={},r=[],n=getComputedStyle(document.documentElement,null),i=document.createElement("div").style,a=function(t){if("-"===t.charAt(0)){r.push(t);var n=t.split("-"),i=n[1];for(e[i]=++e[i]||1;n.length>3;){n.pop();var a=n.join("-");o(a)&&-1===r.indexOf(a)&&r.push(a)}}},o=function(e){return StyleFix.camelCase(e)in i};if(n.length>0)for(var s=0;s
2 |
3 |
4 |
5 |
6 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
--------------------------------------------------------------------------------
/html5-canvas-img-rotate/res/html5_d.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dominik-w/js_html5_com/585e6dcec10aea8e81ea76d759ef9ace64238379/html5-canvas-img-rotate/res/html5_d.png
--------------------------------------------------------------------------------
/html5_canvas_animation/resources/ff_anim.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dominik-w/js_html5_com/585e6dcec10aea8e81ea76d759ef9ace64238379/html5_canvas_animation/resources/ff_anim.png
--------------------------------------------------------------------------------
/html5_canvas_animation/tester_canvas_animation.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
--------------------------------------------------------------------------------
/html5_canvas_mod_script_js_blog/base64.js:
--------------------------------------------------------------------------------
1 | /* Copyright (C) 1999 Masanao Izumo
2 | * Version: 1.0
3 | * LastModified: Dec 25 1999
4 | * This library is free. You can redistribute it and/or modify it.
5 | */
6 |
7 | /*
8 | * Interfaces:
9 | * b64 = base64encode(data);
10 | * data = base64decode(b64);
11 | */
12 |
13 | (function() {
14 |
15 | var base64EncodeChars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
16 | var base64DecodeChars = new Array(
17 | -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
18 | -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
19 | -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 62, -1, -1, -1, 63,
20 | 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, -1, -1, -1, -1, -1, -1,
21 | -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
22 | 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, -1, -1, -1, -1, -1,
23 | -1, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
24 | 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, -1, -1, -1, -1, -1);
25 |
26 | function base64encode(str) {
27 | var out, i, len;
28 | var c1, c2, c3;
29 |
30 | len = str.length;
31 | i = 0;
32 | out = "";
33 | while(i < len) {
34 | c1 = str.charCodeAt(i++) & 0xff;
35 | if(i == len)
36 | {
37 | out += base64EncodeChars.charAt(c1 >> 2);
38 | out += base64EncodeChars.charAt((c1 & 0x3) << 4);
39 | out += "==";
40 | break;
41 | }
42 | c2 = str.charCodeAt(i++);
43 | if(i == len)
44 | {
45 | out += base64EncodeChars.charAt(c1 >> 2);
46 | out += base64EncodeChars.charAt(((c1 & 0x3)<< 4) | ((c2 & 0xF0) >> 4));
47 | out += base64EncodeChars.charAt((c2 & 0xF) << 2);
48 | out += "=";
49 | break;
50 | }
51 | c3 = str.charCodeAt(i++);
52 | out += base64EncodeChars.charAt(c1 >> 2);
53 | out += base64EncodeChars.charAt(((c1 & 0x3)<< 4) | ((c2 & 0xF0) >> 4));
54 | out += base64EncodeChars.charAt(((c2 & 0xF) << 2) | ((c3 & 0xC0) >>6));
55 | out += base64EncodeChars.charAt(c3 & 0x3F);
56 | }
57 | return out;
58 | }
59 |
60 | function base64decode(str) {
61 | var c1, c2, c3, c4;
62 | var i, len, out;
63 |
64 | len = str.length;
65 | i = 0;
66 | out = "";
67 | while(i < len) {
68 | /* c1 */
69 | do {
70 | c1 = base64DecodeChars[str.charCodeAt(i++) & 0xff];
71 | } while(i < len && c1 == -1);
72 | if(c1 == -1)
73 | break;
74 |
75 | /* c2 */
76 | do {
77 | c2 = base64DecodeChars[str.charCodeAt(i++) & 0xff];
78 | } while(i < len && c2 == -1);
79 | if(c2 == -1)
80 | break;
81 |
82 | out += String.fromCharCode((c1 << 2) | ((c2 & 0x30) >> 4));
83 |
84 | /* c3 */
85 | do {
86 | c3 = str.charCodeAt(i++) & 0xff;
87 | if(c3 == 61)
88 | return out;
89 | c3 = base64DecodeChars[c3];
90 | } while(i < len && c3 == -1);
91 | if(c3 == -1)
92 | break;
93 |
94 | out += String.fromCharCode(((c2 & 0XF) << 4) | ((c3 & 0x3C) >> 2));
95 |
96 | /* c4 */
97 | do {
98 | c4 = str.charCodeAt(i++) & 0xff;
99 | if(c4 == 61)
100 | return out;
101 | c4 = base64DecodeChars[c4];
102 | } while(i < len && c4 == -1);
103 | if(c4 == -1)
104 | break;
105 | out += String.fromCharCode(((c3 & 0x03) << 6) | c4);
106 | }
107 | return out;
108 | }
109 |
110 | if (!window.btoa) window.btoa = base64encode;
111 | if (!window.atob) window.atob = base64decode;
112 |
113 | })();
--------------------------------------------------------------------------------
/html5_canvas_mod_script_js_blog/canvas2image.js:
--------------------------------------------------------------------------------
1 | /*
2 | * Canvas2Image v0.1
3 | * Copyright (c) 2008 Jacob Seidelin, jseidelin@nihilogic.dk
4 | * MIT License [http://www.opensource.org/licenses/mit-license.php]
5 | */
6 |
7 | var Canvas2Image = (function() {
8 |
9 | // check if we have canvas support
10 | var bHasCanvas = false;
11 | var oCanvas = document.createElement("canvas");
12 | if (oCanvas.getContext("2d")) {
13 | bHasCanvas = true;
14 | }
15 |
16 | // no canvas, bail out.
17 | if (!bHasCanvas) {
18 | return {
19 | saveAsBMP : function(){},
20 | saveAsPNG : function(){},
21 | saveAsJPEG : function(){}
22 | }
23 | }
24 |
25 | var bHasImageData = !!(oCanvas.getContext("2d").getImageData);
26 | var bHasDataURL = !!(oCanvas.toDataURL);
27 | var bHasBase64 = !!(window.btoa);
28 |
29 | var strDownloadMime = "image/octet-stream";
30 |
31 | // ok, we're good
32 | var readCanvasData = function(oCanvas) {
33 | var iWidth = parseInt(oCanvas.width);
34 | var iHeight = parseInt(oCanvas.height);
35 | return oCanvas.getContext("2d").getImageData(0,0,iWidth,iHeight);
36 | }
37 |
38 | // base64 encodes either a string or an array of charcodes
39 | var encodeData = function(data) {
40 | var strData = "";
41 | if (typeof data == "string") {
42 | strData = data;
43 | } else {
44 | var aData = data;
45 | for (var i=0;i object containing the imagedata
156 | var makeImageObject = function(strSource) {
157 | var oImgElement = document.createElement("img");
158 | oImgElement.src = strSource;
159 | return oImgElement;
160 | }
161 |
162 | var scaleCanvas = function(oCanvas, iWidth, iHeight) {
163 | if (iWidth && iHeight) {
164 | var oSaveCanvas = document.createElement("canvas");
165 | oSaveCanvas.width = iWidth;
166 | oSaveCanvas.height = iHeight;
167 | oSaveCanvas.style.width = iWidth+"px";
168 | oSaveCanvas.style.height = iHeight+"px";
169 |
170 | var oSaveCtx = oSaveCanvas.getContext("2d");
171 |
172 | oSaveCtx.drawImage(oCanvas, 0, 0, oCanvas.width, oCanvas.height, 0, 0, iWidth, iHeight);
173 | return oSaveCanvas;
174 | }
175 | return oCanvas;
176 | }
177 |
178 | return {
179 |
180 | saveAsPNG : function(oCanvas, bReturnImg, iWidth, iHeight) {
181 | if (!bHasDataURL) {
182 | return false;
183 | }
184 | var oScaledCanvas = scaleCanvas(oCanvas, iWidth, iHeight);
185 | var strData = oScaledCanvas.toDataURL("image/png");
186 | if (bReturnImg) {
187 | return makeImageObject(strData);
188 | } else {
189 | saveFile(strData.replace("image/png", strDownloadMime));
190 | }
191 | return true;
192 | },
193 |
194 | saveAsJPEG : function(oCanvas, bReturnImg, iWidth, iHeight) {
195 | if (!bHasDataURL) {
196 | return false;
197 | }
198 |
199 | var oScaledCanvas = scaleCanvas(oCanvas, iWidth, iHeight);
200 | var strMime = "image/jpeg";
201 | var strData = oScaledCanvas.toDataURL(strMime);
202 |
203 | // check if browser actually supports jpeg by looking for the mime type in the data uri.
204 | // if not, return false
205 | if (strData.indexOf(strMime) != 5) {
206 | return false;
207 | }
208 |
209 | if (bReturnImg) {
210 | return makeImageObject(strData);
211 | } else {
212 | saveFile(strData.replace(strMime, strDownloadMime));
213 | }
214 | return true;
215 | },
216 |
217 | saveAsBMP : function(oCanvas, bReturnImg, iWidth, iHeight) {
218 | if (!(bHasImageData && bHasBase64)) {
219 | return false;
220 | }
221 |
222 | var oScaledCanvas = scaleCanvas(oCanvas, iWidth, iHeight);
223 |
224 | var oData = readCanvasData(oScaledCanvas);
225 | var strImgData = createBMP(oData);
226 | if (bReturnImg) {
227 | return makeImageObject(makeDataURI(strImgData, "image/bmp"));
228 | } else {
229 | saveFile(makeDataURI(strImgData, strDownloadMime));
230 | }
231 | return true;
232 | }
233 | };
234 |
235 | })();
--------------------------------------------------------------------------------
/html5_canvas_mod_script_js_blog/input.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dominik-w/js_html5_com/585e6dcec10aea8e81ea76d759ef9ace64238379/html5_canvas_mod_script_js_blog/input.jpg
--------------------------------------------------------------------------------
/html5_canvas_mod_script_js_blog/processor_jpg.php:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/html5_canvas_mod_script_js_blog/processor_png.php:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/html5_canvas_mod_script_js_blog/test_jpg.php:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
11 |
12 |
13 | JSManipulate
14 |
15 |
16 |
17 |
22 |
23 |
62 |
63 |
64 |
65 |
--------------------------------------------------------------------------------
/html5_canvas_mod_script_js_blog/test_png.php:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
11 |
12 |
13 | JSManipulate
14 |
15 |
16 |
17 |
22 |
23 |
69 |
70 |
71 | Demo from code:
72 |
73 |
74 |
75 |
76 |
--------------------------------------------------------------------------------
/html5_canvas_mod_script_js_blog/tests/file_jpg.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dominik-w/js_html5_com/585e6dcec10aea8e81ea76d759ef9ace64238379/html5_canvas_mod_script_js_blog/tests/file_jpg.jpg
--------------------------------------------------------------------------------
/html5_canvas_mod_script_js_blog/tests/file_png.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dominik-w/js_html5_com/585e6dcec10aea8e81ea76d759ef9ace64238379/html5_canvas_mod_script_js_blog/tests/file_png.png
--------------------------------------------------------------------------------
/html5_tutorial_canvas_photo_hints/building.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dominik-w/js_html5_com/585e6dcec10aea8e81ea76d759ef9ace64238379/html5_tutorial_canvas_photo_hints/building.jpg
--------------------------------------------------------------------------------
/html5_tutorial_canvas_photo_hints/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | HTML5 tutorial - hot points on image
8 |
9 |
10 |
11 |
15 |
16 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
--------------------------------------------------------------------------------
/jQTooltips/css/style.css:
--------------------------------------------------------------------------------
1 |
2 | span#own-tooltip {
3 | height: 20px;
4 | position: absolute;
5 | top: 100px;
6 | left: 100px;
7 | border: 2px solid #00f;
8 | background-color: #fff;
9 | color: #00f;
10 | padding: 4px;
11 | display: none;
12 | }
13 |
--------------------------------------------------------------------------------
/jQTooltips/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | jQuery Tooltips
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
Link 1
16 |
Link 2
17 |
Link 3
18 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/jQTooltips/lib/jqt.js:
--------------------------------------------------------------------------------
1 | /*
2 | * Wlasne tooltipy w jQuery
3 | *
4 | * Dominik Wlazlowski
5 | * http://javascript-html5-tutorial.pl/tutorial-jquery-wlasne-tooltipy.html
6 | */
7 |
8 | $(document).ready(function() {
9 | // dodajemy element do ciala dokumentu
10 | $("body").append(" ");
11 |
12 | // dla elementu a posiadajacego atrybut title pokazujemy tooltip
13 | $("a[title]").each(function() {
14 | $(this).hover(function(e) {
15 | // pokaz tooltip pod elementem
16 | $().mousemove(function(e) {
17 | var dY = e.pageY + 4;
18 | var dX = e.pageX + 4;
19 | $("#own-tooltip").css({'top': dY, 'left': dX});
20 | });
21 | $("#own-tooltip").stop(true, true);
22 |
23 | // pobierz tekst z atrybutu title i ustaw go jako
24 | // tekst tooltipa
25 | $("#own-tooltip")
26 | .html($(this).attr('title'))
27 | // i pokaz tooltip z efektem fadeIn
28 | .fadeIn(100);
29 | $(this).removeAttr('title');
30 | }, function() {
31 | $("#own-tooltip").stop(true, true);
32 | // ukryj z efektem fadeOut
33 | $("#own-tooltip").fadeOut(100);
34 | // wyczysc
35 | $(this).attr('title', $("#own-tooltip").html());
36 | });
37 | });
38 | });
39 |
--------------------------------------------------------------------------------
/javascript-clipboard/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | zClip - test
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 | Test kopiowania do schowka
15 |
16 |
17 |
18 |
19 | Skopiuj do schowka
20 |
21 |
22 |
34 |
35 |
36 |
37 |
38 |
--------------------------------------------------------------------------------
/javascript-clipboard/zclip/README.md:
--------------------------------------------------------------------------------
1 | jquery-zclip
2 | ============
3 |
4 | jQuery ZeroClipboard
5 |
6 | Copyright 2011, SteamDev
7 | Released under the MIT license.
8 | http://www.opensource.org/licenses/mit-license.php
9 |
10 | Date: Wed Jun 01, 2011
11 |
--------------------------------------------------------------------------------
/javascript-clipboard/zclip/ZeroClipboard.swf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dominik-w/js_html5_com/585e6dcec10aea8e81ea76d759ef9ace64238379/javascript-clipboard/zclip/ZeroClipboard.swf
--------------------------------------------------------------------------------
/javascript-clipboard/zclip/bower.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "jquery-zclip",
3 | "description": "JQuery wrapper library for ZeroClipboard. Provides an easy way to copy text to the clipboard using an invisible Adobe Flash movie and a jQuery interface.",
4 | "version": "1.1.4",
5 | "main": ["./jquery.zclip.js", "./ZeroClipboard.swf"],
6 | "keywords": ["flash","clipboard","copy","cut","paste","zclip","clip","clippy", "zeroclipboard", "jquery"],
7 | "license": "http://www.opensource.org/licenses/mit-license.php",
8 | "authors": [{"name":"SteamDev","url":"http://www.steamdev.com/zclip/"},{"name":"Patrick Lodder","url":"https://github.com/patricklodder"}],
9 | "homepage": "https://github.com/patricklodder/jquery-zclip",
10 | "repository": {"type":"git","url":"https://github.com/patricklodder/jquery-zclip.git"},
11 | "location": "git://github.com/patricklodder/jquery-zclip.git"
12 | }
13 |
--------------------------------------------------------------------------------
/jqm-forms/tutorial-jquery-mobile_forms1.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | jQuery Mobile - test
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
Forms - demo
19 |
20 |
21 |
40 |
41 |
42 |
43 |
44 |
--------------------------------------------------------------------------------
/jqm-forms/tutorial-jquery-mobile_forms1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dominik-w/js_html5_com/585e6dcec10aea8e81ea76d759ef9ace64238379/jqm-forms/tutorial-jquery-mobile_forms1.png
--------------------------------------------------------------------------------
/jqm-forms/tutorial-jquery-mobile_forms2_radio.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | jQuery Mobile - test
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
Przyciski opcji
18 |
19 |
20 |
61 |
62 |
63 |
64 |
65 |
--------------------------------------------------------------------------------
/jqm-forms/tutorial-jquery-mobile_forms2_radio.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dominik-w/js_html5_com/585e6dcec10aea8e81ea76d759ef9ace64238379/jqm-forms/tutorial-jquery-mobile_forms2_radio.png
--------------------------------------------------------------------------------
/jqm-forms/tutorial-jquery-mobile_forms3_checkbox.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | jQuery Mobile - test
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
Checkbox demo
19 |
20 |
21 |
61 |
62 |
63 |
64 |
65 |
--------------------------------------------------------------------------------
/jqm-forms/tutorial-jquery-mobile_forms3_checkbox.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dominik-w/js_html5_com/585e6dcec10aea8e81ea76d759ef9ace64238379/jqm-forms/tutorial-jquery-mobile_forms3_checkbox.png
--------------------------------------------------------------------------------
/jquery_mobile_dev/html5_c.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dominik-w/js_html5_com/585e6dcec10aea8e81ea76d759ef9ace64238379/jquery_mobile_dev/html5_c.png
--------------------------------------------------------------------------------
/jquery_mobile_dev/html5_e.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dominik-w/js_html5_com/585e6dcec10aea8e81ea76d759ef9ace64238379/jquery_mobile_dev/html5_e.png
--------------------------------------------------------------------------------
/jquery_mobile_dev/tutorial-jquery-mobile_dialog1.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | jQuery Mobile - test
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 | Dialog demo
18 |
19 |
20 |
21 |
Delete it?
22 |
23 |
24 |
25 |
Are you sure you want to delete this item?
26 |
Lorem ipsum ...
27 |
No
28 |
Yes
29 |
30 |
31 |
32 |
33 |
34 |
--------------------------------------------------------------------------------
/jquery_mobile_dev/tutorial-jquery-mobile_dialog1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dominik-w/js_html5_com/585e6dcec10aea8e81ea76d759ef9ace64238379/jquery_mobile_dev/tutorial-jquery-mobile_dialog1.png
--------------------------------------------------------------------------------
/jquery_mobile_dev/tutorial-jquery-mobile_list_filter.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dominik-w/js_html5_com/585e6dcec10aea8e81ea76d759ef9ace64238379/jquery_mobile_dev/tutorial-jquery-mobile_list_filter.png
--------------------------------------------------------------------------------
/jquery_mobile_dev/tutorial-jquery-mobile_lists1.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | jQuery Mobile - test
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
Lists demo
19 |
20 |
21 |
39 |
40 |
41 |
42 |
55 |
56 |
57 |
--------------------------------------------------------------------------------
/jquery_mobile_dev/tutorial-jquery-mobile_lists1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dominik-w/js_html5_com/585e6dcec10aea8e81ea76d759ef9ace64238379/jquery_mobile_dev/tutorial-jquery-mobile_lists1.png
--------------------------------------------------------------------------------
/jquery_mobile_dev/tutorial-jquery-mobile_lists2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dominik-w/js_html5_com/585e6dcec10aea8e81ea76d759ef9ace64238379/jquery_mobile_dev/tutorial-jquery-mobile_lists2.png
--------------------------------------------------------------------------------
/jquery_mobile_dev/tutorial-jquery-mobile_lists_counters.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dominik-w/js_html5_com/585e6dcec10aea8e81ea76d759ef9ace64238379/jquery_mobile_dev/tutorial-jquery-mobile_lists_counters.png
--------------------------------------------------------------------------------
/jquery_mobile_dev/tutorial-jquery-mobile_lists_filter.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | jQuery Mobile - test
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
Filter demo
19 |
20 |
21 |
39 |
40 |
41 |
42 |
43 |
44 |
--------------------------------------------------------------------------------
/jquery_mobile_dev/tutorial-jquery-mobile_lists_icons.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dominik-w/js_html5_com/585e6dcec10aea8e81ea76d759ef9ace64238379/jquery_mobile_dev/tutorial-jquery-mobile_lists_icons.png
--------------------------------------------------------------------------------
/jquery_mobile_dev/tutorial-jquery-mobile_lists_thumbs_format.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | jQuery Mobile - test
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
Lists - thumbs demo
19 |
20 |
21 |
22 |
List with thumbnails and text
23 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/jquery_mobile_dev/tutorial-jquery-mobile_lists_thumbs_format.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dominik-w/js_html5_com/585e6dcec10aea8e81ea76d759ef9ace64238379/jquery_mobile_dev/tutorial-jquery-mobile_lists_thumbs_format.png
--------------------------------------------------------------------------------
/jquery_mobile_dev/tutorial-jquery-mobile_panel1.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | jQuery Mobile - test
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
Panel!
18 |
19 |
20 | You can close the panel by clicking outside the panel,
21 | pressing the Esc key or by swiping.
22 |
23 |
24 |
25 |
26 |
27 |
Page header
28 |
29 |
30 |
31 |
Click on the button to open the Panel.
32 |
Open Panel
33 |
34 |
35 |
36 |
Page Footer
37 |
38 |
39 |
40 |
41 |
42 |
--------------------------------------------------------------------------------
/jquery_mobile_dev/tutorial-jquery-mobile_panel1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dominik-w/js_html5_com/585e6dcec10aea8e81ea76d759ef9ace64238379/jquery_mobile_dev/tutorial-jquery-mobile_panel1.png
--------------------------------------------------------------------------------
/jquery_mobile_dev/tutorial-jquery-mobile_toolbar1.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | jQuery Mobile - test
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
22 |
23 |
26 |
27 |
33 |
34 |
35 |
36 |
37 |
--------------------------------------------------------------------------------
/jquery_mobile_dev/tutorial-jquery-mobile_toolbar1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dominik-w/js_html5_com/585e6dcec10aea8e81ea76d759ef9ace64238379/jquery_mobile_dev/tutorial-jquery-mobile_toolbar1.png
--------------------------------------------------------------------------------
/jquery_mobile_maps/jqm_maps_app.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | jQuery Mobile - Google Maps app
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
Maps App
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
--------------------------------------------------------------------------------
/jquery_mobile_maps/jqm_maps_app.js:
--------------------------------------------------------------------------------
1 |
2 | /*
3 | * Google Maps demo for jQuery Mobile app
4 | */
5 |
6 | $(document).on( "pageinit", "#map-page", function() {
7 | var defaultLatLng = new google.maps.LatLng(52.5242680, 13.4062900); // default: Berlin
8 |
9 | if (navigator.geolocation) {
10 | function success(pos) {
11 | // location found - show map with these coordinates
12 | drawMap(new google.maps.LatLng(pos.coords.latitude, pos.coords.longitude));
13 | }
14 |
15 | function fail(error) {
16 | drawMap(defaultLatLng); // failed - show default map
17 | }
18 |
19 | // find the user's current position; cache the location for 5 minutes, timeout after 6 seconds
20 | navigator.geolocation.getCurrentPosition(success, fail, { maximumAge: 500000, enableHighAccuracy: true, timeout: 6000 });
21 |
22 | } else {
23 | drawMap(defaultLatLng); // no geolocation support - show default map
24 | }
25 |
26 | function drawMap(latlng) {
27 | var myOptions = {
28 | zoom: 10,
29 | center: latlng,
30 | mapTypeId: google.maps.MapTypeId.ROADMAP
31 | };
32 |
33 | var map = new google.maps.Map(document.getElementById("map-area"), myOptions);
34 |
35 | // add an overlay to the map
36 | var marker = new google.maps.Marker({
37 | position: latlng,
38 | map: map,
39 | title: "Hello!"
40 | });
41 | }
42 | });
43 |
--------------------------------------------------------------------------------
/jquery_plugins_dev/basic_1/jq_plugin_dev_1.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | jQuery plugins dev
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 | Test
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/jquery_plugins_dev/basic_1/jq_plugin_dev_1.js:
--------------------------------------------------------------------------------
1 |
2 | /**
3 | * jQuery plugins dev
4 | */
5 |
6 | /* template
7 | (function($){
8 | $.fn.extend({
9 | pluginname: function(options) {
10 | this.defaultOptions = {};
11 |
12 | var settings = $.extend({}, this.defaultOptions, options);
13 |
14 | return this.each(function() {
15 | var $this = $(this);
16 | });
17 | }
18 | });
19 | })(jQuery);
20 | */
21 |
22 | // our simple app as jQ plugin
23 | (function($) {
24 | var myApp = {};
25 |
26 | $.extend(myApp, {
27 | name: 'jQuery plugin demo',
28 | version: '0.1',
29 |
30 | init: function() {
31 | alert(this.name + " v. " + this.version);
32 | }
33 | });
34 |
35 | // init / run
36 | $(function() {
37 | // myApp.name = 'Changed name';
38 | // myApp.version = '0.3';
39 | myApp.init();
40 |
41 | });
42 |
43 | })(jQuery);
44 |
45 |
46 |
--------------------------------------------------------------------------------
/jquery_plugins_dev/jq_plugin_dev_demo2/jq_plugin_dev_demo2.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | jQuery plugins dev
8 |
9 |
10 |
11 |
12 |
21 |
22 |
23 |
24 | Test div
25 |
26 |
27 |
28 | Test div 2
29 |
30 |
31 |
32 |
--------------------------------------------------------------------------------
/jquery_plugins_dev/jq_plugin_dev_demo2/jq_plugin_dev_demo2.js:
--------------------------------------------------------------------------------
1 |
2 | /**
3 | * jQuery plugins development demo
4 | *
5 | * by javascript-html5-tutorial.com
6 | */
7 |
8 | (function($) {
9 |
10 | // we extend jQ by new simple function
11 | $.fn.myFunctionExt = function(param) {
12 | alert("The parameter is: " + param);
13 | };
14 |
15 | // standard CSS modifier for elements
16 | $.fn.myCSSModifier = function() {
17 |
18 | return this.css({
19 | margin: '5px',
20 | padding: '5px',
21 | border: 'solid 2px #f00',
22 | });
23 | };
24 |
25 | // plugin code
26 | $.mySimplePlugin = function(options) {
27 |
28 | // define properties and methods
29 | var str = 'abdef',
30 | number = 128,
31 | arr = ['One', 'Two', 'Three', '...'],
32 |
33 | actions = {
34 | test_alert: function() {
35 | this.myFunctionExt('X1');
36 |
37 | // this.myFunctionExt(str);
38 | this.myFunctionExt(arr[1]);
39 | },
40 |
41 | test_css: function() {
42 | // apply for all elements in body
43 | // this.myCSSModifier();
44 |
45 | // apply only for specified element
46 | $('#d2').myCSSModifier();
47 | },
48 |
49 | default_action: function() {
50 | alert('Bye bye!');
51 | }
52 | },
53 |
54 | // core processing - options
55 |
56 | body = $('body');
57 |
58 | if (options) {
59 | // multiple options
60 | if (typeof options == 'object') {
61 | for(i in options) {
62 | if (options[i] != false && actions[i]) {
63 | actions[i].call(body);
64 | }
65 | }
66 | } else {
67 | // string - one option
68 | if (actions[options]) {
69 | actions[options].call(body);
70 | }
71 | }
72 | } else {
73 | // no option specified - call default
74 | return actions['default_action'].call(body);
75 | }
76 |
77 | };
78 |
79 | })(jQuery);
80 |
81 |
--------------------------------------------------------------------------------
/jquery_plugins_dev/jq_plugin_dev_demo3/jq_plugin_dev_demo3.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | jQuery plugins dev
8 |
9 |
10 |
11 |
12 |
23 |
24 |
25 |
26 | Test pluginu generatora. Odśwież stronę, aby wygenerować nowy:
27 |
28 |
29 |
30 |
31 |
32 |
--------------------------------------------------------------------------------
/jquery_plugins_dev/jq_plugin_dev_demo3/jq_plugin_dev_demo3.js:
--------------------------------------------------------------------------------
1 |
2 | /**
3 | * jQuery plugins development demo
4 | *
5 | * by javascript-html5-tutorial.com
6 | */
7 |
8 | (function($) {
9 |
10 | $.fn.randStrGenerator = function(options) {
11 |
12 | options = $.extend({
13 | minLength: 7,
14 | randomStrLength: 12,
15 | theBox: this
16 | }, options);
17 |
18 | return this.each(function(index) {
19 |
20 | // run automatically
21 | evaluate();
22 |
23 | function evaluate() {
24 | var randomPassword = generate();
25 |
26 | $(options.theBox).val(randomPassword);
27 | }
28 |
29 | function generate() {
30 | var input_chars = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz!?$?%^&*()";
31 | var str_length = options.randomStrLength;
32 | var rnd_str = '';
33 |
34 | for (var i = 0; i < str_length; i++) {
35 | var rnd_num = Math.floor(Math.random() * input_chars.length);
36 | rnd_str += input_chars.substring(rnd_num, rnd_num + 1);
37 | }
38 |
39 | return rnd_str;
40 | }
41 | });
42 |
43 | }
44 |
45 | })(jQuery)
46 |
47 |
--------------------------------------------------------------------------------
/jquery_plugins_dev/jq_plugin_dev_demo4_slideshow/img/1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dominik-w/js_html5_com/585e6dcec10aea8e81ea76d759ef9ace64238379/jquery_plugins_dev/jq_plugin_dev_demo4_slideshow/img/1.png
--------------------------------------------------------------------------------
/jquery_plugins_dev/jq_plugin_dev_demo4_slideshow/img/2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dominik-w/js_html5_com/585e6dcec10aea8e81ea76d759ef9ace64238379/jquery_plugins_dev/jq_plugin_dev_demo4_slideshow/img/2.png
--------------------------------------------------------------------------------
/jquery_plugins_dev/jq_plugin_dev_demo4_slideshow/img/3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dominik-w/js_html5_com/585e6dcec10aea8e81ea76d759ef9ace64238379/jquery_plugins_dev/jq_plugin_dev_demo4_slideshow/img/3.png
--------------------------------------------------------------------------------
/jquery_plugins_dev/jq_plugin_dev_demo4_slideshow/img/4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dominik-w/js_html5_com/585e6dcec10aea8e81ea76d759ef9ace64238379/jquery_plugins_dev/jq_plugin_dev_demo4_slideshow/img/4.png
--------------------------------------------------------------------------------
/jquery_plugins_dev/jq_plugin_dev_demo4_slideshow/img/5.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dominik-w/js_html5_com/585e6dcec10aea8e81ea76d759ef9ace64238379/jquery_plugins_dev/jq_plugin_dev_demo4_slideshow/img/5.png
--------------------------------------------------------------------------------
/jquery_plugins_dev/jq_plugin_dev_demo4_slideshow/img/6.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dominik-w/js_html5_com/585e6dcec10aea8e81ea76d759ef9ace64238379/jquery_plugins_dev/jq_plugin_dev_demo4_slideshow/img/6.png
--------------------------------------------------------------------------------
/jquery_plugins_dev/jq_plugin_dev_demo4_slideshow/jq_plugin_dev_demo4.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | jQuery plugins dev
8 |
9 |
10 |
11 |
12 |
18 |
19 |
24 |
25 |
26 |
27 |
28 | Test - slide show
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
--------------------------------------------------------------------------------
/jquery_plugins_dev/jq_plugin_dev_demo4_slideshow/jq_plugin_dev_demo4.js:
--------------------------------------------------------------------------------
1 |
2 | /**
3 | * jQuery plugins development demo - slide show
4 | *
5 | * by javascript-html5-tutorial.com
6 | */
7 |
8 | (function($) {
9 | $.mySlideShow = function(element, settings) {
10 |
11 | // setup
12 | var config = {
13 | 'fadeSpeed': 500,
14 | 'delay': 1000
15 | };
16 |
17 | if (settings) {
18 | $.extend(config, settings);
19 | }
20 |
21 | var obj = $(element);
22 | var img = obj.children('img');
23 | var count = img.length;
24 | var i = 0;
25 |
26 | // display first image
27 | img.eq(0).show();
28 |
29 | // run
30 | setInterval(function() {
31 | img.eq(i).fadeOut(config.fadeSpeed);
32 |
33 | i = (i + 1 == count) ? 0 : i + 1;
34 | img.eq(i).fadeIn(config.fadeSpeed);
35 | }, config.delay);
36 |
37 | return this;
38 | };
39 |
40 | })(jQuery);
41 |
--------------------------------------------------------------------------------
/jquery_tutorial_sliding_menu/css/style.css:
--------------------------------------------------------------------------------
1 |
2 | body {
3 | margin: 2px;
4 | padding: 2px;
5 | }
6 |
7 | a {
8 | font-family: Arial, Helvetica, sans-serif;
9 | font-size: 18pt;
10 | font-weight: bold;
11 | color: #ffffff;
12 | text-decoration: none;
13 | }
14 |
15 | a:hover {
16 | font-family: Arial, Helvetica, sans-serif;
17 | font-size: 18pt;
18 | font-weight: bold;
19 | color: #ffff00;
20 | text-decoration: none;
21 | }
22 |
23 | img {
24 | border: 0px;
25 | margin: 0px;
26 | padding: 0px;
27 | }
28 |
29 | /* menu - main container */
30 |
31 | div#jq_menu {
32 | width: 640px;
33 | height: 200px;
34 | padding: 0px;
35 | margin: 20px auto 0px 20px;
36 | }
37 |
38 | div#jq_menu ul {
39 | border: 0px;
40 | display: block;
41 | list-style-type:none;
42 | width: 800px;
43 | height: 200px;
44 | margin: 0px;
45 | padding: 0px;
46 | }
47 |
48 | div#jq_menu ul li {
49 | float: left;
50 | }
51 |
52 | div#jq_menu ul li a {
53 | display: block;
54 | border-right: 1px solid #ffffff;
55 | width: 90px;
56 | height: 200px;
57 | }
58 |
59 | /* menu items */
60 | div#jq_menu ul li.menu_item_1 a {
61 | background: url(../img/menu_img_1.jpg);
62 | }
63 |
64 | div#jq_menu ul li.menu_item_2 a {
65 | background: url(../img/menu_img_2.jpg);
66 | }
67 |
68 | div#jq_menu ul li.menu_item_3 a {
69 | background: url(../img/menu_img_3.jpg);
70 | }
71 |
72 | div#jq_menu ul li.menu_item_4 a {
73 | background: url(../img/menu_img_4.jpg);
74 | }
75 |
76 | div#jq_menu ul li.menu_item_5 a {
77 | background: url(../img/menu_img_5.jpg);
78 | }
79 |
80 |
--------------------------------------------------------------------------------
/jquery_tutorial_sliding_menu/img/menu_img_1.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dominik-w/js_html5_com/585e6dcec10aea8e81ea76d759ef9ace64238379/jquery_tutorial_sliding_menu/img/menu_img_1.jpg
--------------------------------------------------------------------------------
/jquery_tutorial_sliding_menu/img/menu_img_2.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dominik-w/js_html5_com/585e6dcec10aea8e81ea76d759ef9ace64238379/jquery_tutorial_sliding_menu/img/menu_img_2.jpg
--------------------------------------------------------------------------------
/jquery_tutorial_sliding_menu/img/menu_img_3.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dominik-w/js_html5_com/585e6dcec10aea8e81ea76d759ef9ace64238379/jquery_tutorial_sliding_menu/img/menu_img_3.jpg
--------------------------------------------------------------------------------
/jquery_tutorial_sliding_menu/img/menu_img_4.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dominik-w/js_html5_com/585e6dcec10aea8e81ea76d759ef9ace64238379/jquery_tutorial_sliding_menu/img/menu_img_4.jpg
--------------------------------------------------------------------------------
/jquery_tutorial_sliding_menu/img/menu_img_5.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dominik-w/js_html5_com/585e6dcec10aea8e81ea76d759ef9ace64238379/jquery_tutorial_sliding_menu/img/menu_img_5.jpg
--------------------------------------------------------------------------------
/jquery_tutorial_sliding_menu/img/menu_img_6.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dominik-w/js_html5_com/585e6dcec10aea8e81ea76d759ef9ace64238379/jquery_tutorial_sliding_menu/img/menu_img_6.jpg
--------------------------------------------------------------------------------
/jquery_tutorial_sliding_menu/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | Tutorial jQuery - sliding horizontal menu
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
38 |
39 |
40 |
41 |
--------------------------------------------------------------------------------
/jquery_tutorial_sliding_menu/js/menu_funcs.js:
--------------------------------------------------------------------------------
1 |
2 | /**
3 | * Sliding horizontal menu, using jQuery and jquery.easing plugin
4 | *
5 | * by http://javascript-html5-tutorial.com/
6 | */
7 |
8 | $(document).ready(function () {
9 |
10 | $("div#jq_menu ul li a").hover(function() {
11 |
12 | if ($(this).is(":animated")) {
13 | $(this).stop().animate({width: "300px"}, {duration: 360, easing: "easeOutQuad"});
14 | } else {
15 | $(this).stop().animate({width: "300px"}, {duration: 360, easing: "easeOutQuad"});
16 | }
17 | },
18 | turn_back = function () {
19 |
20 | if ($(this).is(":animated")) {
21 | $(this).stop().animate({width: "90px"}, {duration: 360, easing: "easeInOutQuad"});
22 | } else {
23 | $(this).stop(":animated").animate({width: "90px"}, {duration: 360, easing: "easeInOutQuad"});
24 | }
25 | });
26 |
27 | });
28 |
--------------------------------------------------------------------------------
/less-css-samples/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 | Ten tytuł jest czerwony dzięki LESS CSS
11 |
12 |
13 |
--------------------------------------------------------------------------------
/less-css-samples/tests.less:
--------------------------------------------------------------------------------
1 |
2 | @my_color: #ed0000;
3 |
4 | h2 {
5 | color: @my_color;
6 | }
7 |
8 | .myClass {
9 | width: 100px;
10 | color: @my_color;
11 | }
12 |
--------------------------------------------------------------------------------
/menuapp/.project:
--------------------------------------------------------------------------------
1 |
2 |
3 | menuapp
4 |
5 |
6 |
7 |
8 |
9 | com.aptana.ide.apollo.apollobuilder
10 |
11 |
12 |
13 |
14 |
15 | com.aptana.ide.apollo.apollonature
16 |
17 |
18 |
--------------------------------------------------------------------------------
/menuapp/.settings/org.eclipse.core.resources.prefs:
--------------------------------------------------------------------------------
1 | #Mon Jul 26 17:21:26 CEST 2010
2 | eclipse.preferences.version=1
3 | encoding/=UTF-8
4 |
--------------------------------------------------------------------------------
/menuapp/application.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
15 |
16 |
17 | com.adobe.example.menuapp
18 |
19 |
20 | menuapp
21 |
22 |
23 | menuapp
24 |
25 |
26 | 1.0
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 | menuapp.html
38 |
39 |
40 |
41 |
42 |
43 | standard
44 |
45 |
46 | false
47 |
48 |
49 | true
50 |
51 |
52 | true
53 |
54 |
55 | true
56 |
57 |
58 | true
59 |
60 |
61 | 800
62 |
63 |
64 | 600
65 |
66 |
67 | 100
68 |
69 |
70 | 100
71 |
72 |
73 | 800 600
74 |
75 |
76 | 1280 1024
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
87 |
88 | icons/AIRApp_16.png
89 | icons/AIRApp_32.png
90 | icons/AIRApp_48.png
91 | icons/AIRApp_128.png
92 |
93 |
94 |
97 |
98 |
99 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 |
110 |
111 |
112 |
113 |
114 |
115 |
116 |
122 |
123 |
124 |
125 |
126 |
--------------------------------------------------------------------------------
/menuapp/icons/AIRApp_128.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dominik-w/js_html5_com/585e6dcec10aea8e81ea76d759ef9ace64238379/menuapp/icons/AIRApp_128.png
--------------------------------------------------------------------------------
/menuapp/icons/AIRApp_16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dominik-w/js_html5_com/585e6dcec10aea8e81ea76d759ef9ace64238379/menuapp/icons/AIRApp_16.png
--------------------------------------------------------------------------------
/menuapp/icons/AIRApp_32.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dominik-w/js_html5_com/585e6dcec10aea8e81ea76d759ef9ace64238379/menuapp/icons/AIRApp_32.png
--------------------------------------------------------------------------------
/menuapp/icons/AIRApp_48.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dominik-w/js_html5_com/585e6dcec10aea8e81ea76d759ef9ace64238379/menuapp/icons/AIRApp_48.png
--------------------------------------------------------------------------------
/menuapp/jaxer_bin/.project:
--------------------------------------------------------------------------------
1 |
2 |
3 | menuapp
4 |
5 |
6 |
7 |
8 |
9 | com.aptana.ide.apollo.apollobuilder
10 |
11 |
12 |
13 |
14 |
15 | com.aptana.ide.apollo.apollonature
16 |
17 |
18 |
--------------------------------------------------------------------------------
/menuapp/jaxer_bin/.settings/org.eclipse.core.resources.prefs:
--------------------------------------------------------------------------------
1 | #Mon Jul 26 17:21:26 CEST 2010
2 | eclipse.preferences.version=1
3 | encoding/=UTF-8
4 |
--------------------------------------------------------------------------------
/menuapp/jaxer_bin/.tmp_menuapp.html.53066~:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dominik-w/js_html5_com/585e6dcec10aea8e81ea76d759ef9ace64238379/menuapp/jaxer_bin/.tmp_menuapp.html.53066~
--------------------------------------------------------------------------------
/menuapp/jaxer_bin/application.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
15 |
16 |
17 | com.adobe.example.menuapp
18 |
19 |
20 | menuapp
21 |
22 |
23 | menuapp
24 |
25 |
26 | 1.0
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 | menuapp.html
38 |
39 |
40 |
41 |
42 |
43 | standard
44 |
45 |
46 | false
47 |
48 |
49 | true
50 |
51 |
52 | true
53 |
54 |
55 | true
56 |
57 |
58 | true
59 |
60 |
61 | 800
62 |
63 |
64 | 600
65 |
66 |
67 | 100
68 |
69 |
70 | 100
71 |
72 |
73 | 800 600
74 |
75 |
76 | 1280 1024
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
87 |
88 | icons/AIRApp_16.png
89 | icons/AIRApp_32.png
90 | icons/AIRApp_48.png
91 | icons/AIRApp_128.png
92 |
93 |
94 |
97 |
98 |
99 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 |
110 |
111 |
112 |
113 |
114 |
115 |
116 |
122 |
123 |
124 |
125 |
126 |
--------------------------------------------------------------------------------
/menuapp/jaxer_bin/icons/AIRApp_128.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dominik-w/js_html5_com/585e6dcec10aea8e81ea76d759ef9ace64238379/menuapp/jaxer_bin/icons/AIRApp_128.png
--------------------------------------------------------------------------------
/menuapp/jaxer_bin/icons/AIRApp_16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dominik-w/js_html5_com/585e6dcec10aea8e81ea76d759ef9ace64238379/menuapp/jaxer_bin/icons/AIRApp_16.png
--------------------------------------------------------------------------------
/menuapp/jaxer_bin/icons/AIRApp_32.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dominik-w/js_html5_com/585e6dcec10aea8e81ea76d759ef9ace64238379/menuapp/jaxer_bin/icons/AIRApp_32.png
--------------------------------------------------------------------------------
/menuapp/jaxer_bin/icons/AIRApp_48.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dominik-w/js_html5_com/585e6dcec10aea8e81ea76d759ef9ace64238379/menuapp/jaxer_bin/icons/AIRApp_48.png
--------------------------------------------------------------------------------
/menuapp/jaxer_bin/menuapp.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Menu w Adobe AIR
5 |
6 |
86 |
87 |
88 |
89 | Zawartość
90 |
91 |
92 |
--------------------------------------------------------------------------------
/menuapp/menuapp.air:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dominik-w/js_html5_com/585e6dcec10aea8e81ea76d759ef9ace64238379/menuapp/menuapp.air
--------------------------------------------------------------------------------
/menuapp/menuapp.html:
--------------------------------------------------------------------------------
1 |
2 |
3 | Menu w Adobe AIR
4 |
5 |
85 |
86 |
87 |
88 | Zawartość
89 |
90 |
91 |
--------------------------------------------------------------------------------
/nauka-jq-mobile/jq-mobile-collapsible.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dominik-w/js_html5_com/585e6dcec10aea8e81ea76d759ef9ace64238379/nauka-jq-mobile/jq-mobile-collapsible.png
--------------------------------------------------------------------------------
/nauka-jq-mobile/jquery-mobile-buttons-controlgroup.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dominik-w/js_html5_com/585e6dcec10aea8e81ea76d759ef9ace64238379/nauka-jq-mobile/jquery-mobile-buttons-controlgroup.png
--------------------------------------------------------------------------------
/nauka-jq-mobile/jquery-mobile-buttons-pages-demo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dominik-w/js_html5_com/585e6dcec10aea8e81ea76d759ef9ace64238379/nauka-jq-mobile/jquery-mobile-buttons-pages-demo.png
--------------------------------------------------------------------------------
/nauka-jq-mobile/test_jquery_mobile2_ui.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | jQuery Mobile - test
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
Buttons demo
19 |
20 |
21 |
24 |
25 |
26 |
Footer - first page
27 |
28 |
29 |
30 |
31 |
32 |
Page 2
33 |
34 |
35 |
38 |
39 |
40 |
Footer - second page
41 |
42 |
43 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/nauka-jq-mobile/test_jquery_mobile3_btn_controlgroup.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | jQuery Mobile - test
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
Buttons - groups
19 |
20 |
21 |
36 |
37 |
38 |
Footer
39 |
40 |
41 |
42 |
43 |
44 |
--------------------------------------------------------------------------------
/nauka-jq-mobile/test_jquery_mobile4-icons.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | jQuery Mobile - test
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
Buttons
19 |
20 |
21 |
22 |
23 |
24 |
Plus - link
25 |
26 |
Minus - button element
27 |
28 |
29 |
30 | Icons only:
31 |
32 |
Search
33 |
34 |
35 |
36 |
37 |
38 |
39 |
Footer
40 |
41 |
42 |
43 |
44 |
45 |
--------------------------------------------------------------------------------
/nauka-jq-mobile/test_jquery_mobile5-icons_pos.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | jQuery Mobile - test
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
Icons - positions
19 |
20 |
21 |
22 |
Test:
23 |
Top
24 |
Bottom
25 |
Right
26 |
Left
27 |
28 |
29 |
30 |
Footer
31 |
32 |
33 |
34 |
35 |
36 |
37 |
--------------------------------------------------------------------------------
/nauka-jq-mobile/test_jquery_mobile6-transition.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | jQuery Mobile - test
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
Page one
19 |
20 |
21 |
27 |
28 |
29 |
30 |
31 |
Page two
32 |
33 |
34 |
35 | Hello again!
36 |
37 |
38 |
39 |
40 |
41 |
--------------------------------------------------------------------------------
/nauka-jq-mobile/test_jquery_mobile7_collapsible.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | jQuery Mobile - test
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
Collapsible
19 |
20 |
21 |
22 |
23 |
Touch here
24 |
The content - first...
25 |
26 |
27 |
28 |
Touch here
29 |
Hidden content - second...
30 |
31 |
32 |
33 |
34 |
35 |
36 |
--------------------------------------------------------------------------------
/node-socket-io-rt-comments/comments.js:
--------------------------------------------------------------------------------
1 | /*
2 | * node.js and socket.io - real-time, simple comments feature
3 | * (c) http://javascript-html5-tutorial.com/
4 | */
5 |
6 | var http = require('http'),
7 | fs = require('fs'),
8 | index = "Listening";
9 |
10 | // setup
11 | var config = require('./config.js');
12 | var tools = require('./tools.js');
13 |
14 | var PORT = config.general.port;
15 | var HOST = config.general.host;
16 |
17 | // DB connection
18 | var mysql = require('mysql');
19 |
20 | var db_access = {
21 | host: config.db.host,
22 | user: config.db.username,
23 | password: config.db.password,
24 | database: config.db.dbname
25 | };
26 |
27 | var tbl_comments = config.db.comments_tbl;
28 |
29 | // send html content to all requests
30 | var app = http.createServer(function (req, res) {
31 | res.writeHead(200, {'Content-Type': 'text/html'});
32 | res.end(index);
33 | });
34 |
35 | var io = require('socket.io').listen(app);
36 |
37 | io.sockets.on('connection', function (socket) {
38 | socket.nick = '';
39 | socket.comment = '';
40 | socket.article_id = 0;
41 |
42 | socket.on('send', function (data) {
43 |
44 | data.c_data.comment = tools.sanitize(data.c_data.comment);
45 |
46 | socket.nick = data.c_data.nick;
47 | socket.comment = data.c_data.comment;
48 | socket.article_id = data.c_data.article_id;
49 |
50 | if (config.general.debug) {
51 | console.log('New comment to article: ' + socket.article_id);
52 | }
53 |
54 | // insert data to DB and emit back to all connected sockets
55 | insertComment(socket, data.c_data);
56 | });
57 |
58 | socket.on('disconnect', function () {
59 | console.log('User disconnected');
60 | });
61 |
62 | });
63 |
64 | function insertComment(socket, c_data) {
65 |
66 | var connection = mysql.createConnection(db_access);
67 | connection.connect();
68 |
69 | var clean_comment = tools.addslashes(socket.comment);
70 |
71 | var q = "INSERT INTO " + tbl_comments + " (article_id, sender, body, created_at) ";
72 | q += "VALUES (" + socket.article_id + ", '" + socket.nick + "', '" + clean_comment + "', NOW() )";
73 | // console.log(q);
74 |
75 | connection.query(q, function (qe, qr) {
76 | if (qe && config.general.debug) { console.log(qe); }
77 |
78 | // add to array the last insert ID (new comment ID)
79 | c_data.comment_id = qr.insertId;
80 | c_data.time = tools.getNow();
81 |
82 | // io.sockets = emit to all
83 | io.sockets.emit("add_comment", {
84 | comment_data: c_data
85 | });
86 |
87 | connection.end();
88 | });
89 | }
90 |
91 | app.listen(PORT);
92 |
93 | console.log('Server running at ' + HOST + ':' + PORT + '/');
94 |
--------------------------------------------------------------------------------
/node-socket-io-rt-comments/config.js:
--------------------------------------------------------------------------------
1 | /*
2 | * node app configuration
3 | * (c) http://javascript-html5-tutorial.com/
4 | */
5 |
6 | var config = {};
7 | config.db = {};
8 | config.general = {};
9 |
10 | config.db.type = 'mysql';
11 | config.db.charset = 'utf8';
12 |
13 | config.db.username = 'user';
14 | config.db.password = 'pass';
15 | config.db.host = 'localhost';
16 | config.db.dbname = 'node_tests'; // DB name
17 |
18 | config.db.comments_tbl = 'tbl_comments';
19 |
20 | config.general.host = '//localhost'; // http://my.host.com etc
21 | config.general.port = 1350;
22 | config.general.debug = true; // debug mode on/off
23 |
24 | // export
25 | module.exports = config;
26 |
--------------------------------------------------------------------------------
/node-socket-io-rt-comments/index.php:
--------------------------------------------------------------------------------
1 |
12 |
13 |
14 |
15 |
16 | Socket.IO Tutorial
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
42 |
43 |
44 |
45 | Welcome to our comment system
46 |
47 | Write something...
48 |
49 |
51 |
52 |
53 | Your name:
54 |
55 |
56 | Message:
57 |
58 |
59 | Send
60 |
61 |
114 |
115 |
116 |
--------------------------------------------------------------------------------
/node-socket-io-rt-comments/node_modules/Readme.txt:
--------------------------------------------------------------------------------
1 | http://javascript-html5-tutorial.com/
2 |
3 |
4 | npm install socket.io
5 |
6 | npm install mysql
7 |
--------------------------------------------------------------------------------
/node-socket-io-rt-comments/tbl_comments_mysql.sql:
--------------------------------------------------------------------------------
1 |
2 | CREATE TABLE IF NOT EXISTS `tbl_comments` (
3 | `comment_id` int(11) NOT NULL AUTO_INCREMENT,
4 | `article_id` int(11) DEFAULT '0',
5 | `sender` varchar(100) NOT NULL,
6 | `body` TEXT NOT NULL,
7 | `created_at` datetime DEFAULT NULL,
8 | PRIMARY KEY (`comment_id`)
9 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
10 |
--------------------------------------------------------------------------------
/node-socket-io-rt-comments/tools.js:
--------------------------------------------------------------------------------
1 | /*
2 | * Utils for node.js programs
3 | * (c) http://javascript-html5-tutorial.com/
4 | */
5 |
6 | var tools = {
7 | sanitize: function (html) {
8 | return String(html)
9 | .replace(/&(?!\w+;)/g, '&')
10 | .replace(//g, '>')
12 | .replace(/"/g, '"');
13 | },
14 |
15 | addslashes: function (str) {
16 | // http://phpjs.org/functions/addslashes/
17 | return (str + '')
18 | .replace(/[\\"']/g, '\\$&')
19 | .replace(/\u0000/g, '\\0');
20 | },
21 |
22 | getNow: function () {
23 | var date = new Date();
24 |
25 | var year = date.getFullYear();
26 |
27 | var month = date.getMonth() + 1;
28 | month = (month < 10 ? "0" : "") + month;
29 |
30 | var day = date.getDate();
31 | day = (day < 10 ? "0" : "") + day;
32 |
33 | var hh = date.getHours();
34 | hh = (hh < 10 ? "0" : "") + hh;
35 |
36 | var mm = date.getMinutes();
37 | mm = (mm < 10 ? "0" : "") + mm;
38 |
39 | return year + "-" + month + "-" + day + " " + hh + ":" + mm;
40 | }
41 |
42 | };
43 |
44 | module.exports = tools;
45 |
--------------------------------------------------------------------------------
/node-socket-io-tutorial/config.js:
--------------------------------------------------------------------------------
1 | /*
2 | * node app configuration
3 | */
4 |
5 | var config = {};
6 | config.db = {};
7 | config.general = {}; // added
8 |
9 | config.db.type = 'mysql';
10 | config.db.charset = 'utf8';
11 |
12 | config.db.username = 'user';
13 | config.db.password = 'pass';
14 | config.db.host = 'localhost';
15 | config.db.dbname = 'node_tests'; // DB name
16 |
17 | config.db.comments_tbl = 'comments';
18 |
19 | // added
20 | config.general.host = '//localhost'; // http://my.host.com etc
21 | config.general.port = 1337;
22 | config.general.debug = false; // debug mode on/off
23 |
24 | // export
25 | module.exports = config;
26 |
--------------------------------------------------------------------------------
/node-socket-io-tutorial/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Socket.io tests
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
--------------------------------------------------------------------------------
/node-socket-io-tutorial/test.js:
--------------------------------------------------------------------------------
1 | /*
2 | * node.js and socket.io tests
3 | */
4 |
5 | var http = require('http'),
6 | fs = require('fs'),
7 | index = fs.readFileSync(__dirname + '/index.html');
8 |
9 | // setup
10 | var config = require('./config.js');
11 | var PORT = config.general.port;
12 | var HOST = config.general.host;
13 |
14 | // send html content to all requests
15 | var app = http.createServer(function (req, res) {
16 | res.writeHead(200, {'Content-Type': 'text/html'});
17 | res.end(index);
18 | });
19 |
20 | // socket.io server is listening ...
21 | var io = require('socket.io').listen(app);
22 |
23 | // sample function:
24 | // send current time to all connected clients
25 | function sendTime() {
26 | io.sockets.emit('time', {
27 | time: new Date().toJSON()
28 | });
29 | }
30 |
31 | // send current time every 10 secs
32 | setInterval(sendTime, 10000);
33 |
34 | // emit welcome message on connection
35 | io.sockets.on('connection', function (socket) {
36 | socket.user_id = 0; // current user ID
37 |
38 | socket.emit('welcome', {message: 'Welcome!'});
39 |
40 | socket.on('sayhi', console.log); // just log data in console
41 |
42 | // process the data
43 | socket.on('user_online_data', function (data) {
44 | socket.user_id = data.mydata.id; // "socket scope"
45 |
46 | var name = data.mydata.name; // local scope
47 | console.log("User #:" + socket.user_id + ", name: " + name);
48 | });
49 | });
50 |
51 | app.listen(PORT);
52 |
53 | console.log('Server running at ' + HOST + ':' + PORT + '/');
54 | // console.log('Debug: ' + config.main.debug);
55 |
--------------------------------------------------------------------------------
/test_html5_attr.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Test własnych atrybutów HTML5
6 |
7 |
25 |
26 |
27 |
28 | Samochody
29 | Kliknij, aby zobaczyć markę samochodu:
30 |
31 |
32 | Bora
34 | Cruze
36 | Octavia
38 | S60
40 |
41 |
42 |
43 |
44 |
45 | Ten element przechowuje datę i miejsce moich urodzin.
46 |
47 |
48 |
49 |
50 |
51 |
--------------------------------------------------------------------------------
/test_jquery_mobile1.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | jQuery Mobile - test
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
Page Title
19 |
20 |
21 |
24 |
25 |
26 |
Page Footer
27 |
28 |
29 |
30 |
31 |
32 |
--------------------------------------------------------------------------------
/test_js1.js:
--------------------------------------------------------------------------------
1 |
2 | /**
3 | * Test - JS
4 | *
5 | * by javascript-html5-tutorial.com
6 | */
7 |
8 | function getCarData() {
9 |
10 | var myCar = {
11 | name: "VW",
12 | model: "Bora",
13 | power_hp: 110,
14 | getColor: function () {
15 | // ...
16 | }
17 | };
18 |
19 | alert(myCar.hasOwnProperty('constructor')); // false
20 | alert(myCar.hasOwnProperty('getColor')); // true
21 | alert(myCar.hasOwnProperty('megaFooBarNonExisting')); // false
22 |
23 | if (myCar.hasOwnProperty('power_hp')) {
24 | alert(typeof(myCar.power_hp)); // number
25 | }
26 | }
27 |
28 | getCarData();
29 |
--------------------------------------------------------------------------------
/tester_canvas_file.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
--------------------------------------------------------------------------------
/tutorial-jquery-mobile_basic1.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | jQuery Mobile - test
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
My Title
20 |
21 |
22 |
23 |
Hello jQuery Mobile
24 |
25 |
31 |
32 |
33 |
34 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
--------------------------------------------------------------------------------
/tutorial-jquery-mobile_pages.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | jQuery Mobile - test
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
Home
19 |
20 |
21 |
24 |
25 |
26 |
27 |
28 |
About us page
29 |
30 |
31 |
32 |
We love mobile development!
33 |
Go home
34 |
35 |
36 |
37 |
38 |
39 |
--------------------------------------------------------------------------------
/uploadify/check-exists.php:
--------------------------------------------------------------------------------
1 |
6 | */
7 |
8 | // Define a destination
9 | $targetFolder = '/uploads'; // Relative to the root and should match the upload folder in the uploader script
10 |
11 | if (file_exists($_SERVER['DOCUMENT_ROOT'] . $targetFolder . '/' . $_POST['filename'])) {
12 | echo 1;
13 | } else {
14 | echo 0;
15 | }
16 | ?>
--------------------------------------------------------------------------------
/uploadify/index.php:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | My Uploader
5 |
6 |
7 |
8 |
9 |
10 | Uploadify Test
11 |
15 |
16 |
35 |
36 |
37 |
38 |
--------------------------------------------------------------------------------
/uploadify/license.txt:
--------------------------------------------------------------------------------
1 | Uploadify
2 | Copyright (c) 2012 Reactive Apps, Ronnie Garcia
3 |
4 | Permission is hereby granted, free of charge, to any person obtaining a copy
5 | of this software and associated documentation files (the "Software"), to deal
6 | in the Software without restriction, including without limitation the rights
7 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8 | copies of the Software, and to permit persons to whom the Software is
9 | furnished to do so, subject to the following conditions:
10 |
11 | The above copyright notice and this permission notice shall be included in
12 | all copies or substantial portions of the Software.
13 |
14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
20 | THE SOFTWARE.
--------------------------------------------------------------------------------
/uploadify/uploadify-cancel.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dominik-w/js_html5_com/585e6dcec10aea8e81ea76d759ef9ace64238379/uploadify/uploadify-cancel.png
--------------------------------------------------------------------------------
/uploadify/uploadify.css:
--------------------------------------------------------------------------------
1 | /*
2 | Uploadify
3 | Copyright (c) 2012 Reactive Apps, Ronnie Garcia
4 | Released under the MIT License
5 | */
6 |
7 | .uploadify {
8 | position: relative;
9 | margin-bottom: 1em;
10 | }
11 | .uploadify-button {
12 | background-color: #505050;
13 | background-image: linear-gradient(bottom, #505050 0%, #707070 100%);
14 | background-image: -o-linear-gradient(bottom, #505050 0%, #707070 100%);
15 | background-image: -moz-linear-gradient(bottom, #505050 0%, #707070 100%);
16 | background-image: -webkit-linear-gradient(bottom, #505050 0%, #707070 100%);
17 | background-image: -ms-linear-gradient(bottom, #505050 0%, #707070 100%);
18 | background-image: -webkit-gradient(
19 | linear,
20 | left bottom,
21 | left top,
22 | color-stop(0, #505050),
23 | color-stop(1, #707070)
24 | );
25 | background-position: center top;
26 | background-repeat: no-repeat;
27 | -webkit-border-radius: 30px;
28 | -moz-border-radius: 30px;
29 | border-radius: 30px;
30 | border: 2px solid #808080;
31 | color: #FFF;
32 | font: bold 12px Arial, Helvetica, sans-serif;
33 | text-align: center;
34 | text-shadow: 0 -1px 0 rgba(0,0,0,0.25);
35 | width: 100%;
36 | }
37 | .uploadify:hover .uploadify-button {
38 | background-color: #606060;
39 | background-image: linear-gradient(top, #606060 0%, #808080 100%);
40 | background-image: -o-linear-gradient(top, #606060 0%, #808080 100%);
41 | background-image: -moz-linear-gradient(top, #606060 0%, #808080 100%);
42 | background-image: -webkit-linear-gradient(top, #606060 0%, #808080 100%);
43 | background-image: -ms-linear-gradient(top, #606060 0%, #808080 100%);
44 | background-image: -webkit-gradient(
45 | linear,
46 | left bottom,
47 | left top,
48 | color-stop(0, #606060),
49 | color-stop(1, #808080)
50 | );
51 | background-position: center bottom;
52 | }
53 | .uploadify-button.disabled {
54 | background-color: #D0D0D0;
55 | color: #808080;
56 | }
57 | .uploadify-queue {
58 | margin-bottom: 1em;
59 | }
60 | .uploadify-queue-item {
61 | background-color: #F5F5F5;
62 | -webkit-border-radius: 3px;
63 | -moz-border-radius: 3px;
64 | border-radius: 3px;
65 | font: 11px Verdana, Geneva, sans-serif;
66 | margin-top: 5px;
67 | max-width: 350px;
68 | padding: 10px;
69 | }
70 | .uploadify-error {
71 | background-color: #FDE5DD !important;
72 | }
73 | .uploadify-queue-item .cancel a {
74 | background: url('../img/uploadify-cancel.png') 0 0 no-repeat;
75 | float: right;
76 | height: 16px;
77 | text-indent: -9999px;
78 | width: 16px;
79 | }
80 | .uploadify-queue-item.completed {
81 | background-color: #E5E5E5;
82 | }
83 | .uploadify-progress {
84 | background-color: #E5E5E5;
85 | margin-top: 10px;
86 | width: 100%;
87 | }
88 | .uploadify-progress-bar {
89 | background-color: #0099FF;
90 | height: 3px;
91 | width: 1px;
92 | }
--------------------------------------------------------------------------------
/uploadify/uploadify.php:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/uploadify/uploadify.swf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dominik-w/js_html5_com/585e6dcec10aea8e81ea76d759ef9ace64238379/uploadify/uploadify.swf
--------------------------------------------------------------------------------
/uploadify/uploads/test.txt:
--------------------------------------------------------------------------------
1 | test
2 |
--------------------------------------------------------------------------------
/web-storage-demo-ui-app-full.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | JavaScript localStorage - demo app
9 |
10 |
11 |
12 |
21 |
22 |
23 |
24 |
25 |
46 |
47 |
109 |
110 |
111 |
112 |
--------------------------------------------------------------------------------
/web-storage-demo.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | Demo - JavaScript and web storage
8 |
9 |
10 |
11 |
12 |
42 |
43 |
44 |
45 |
--------------------------------------------------------------------------------