anonim_4396
| anonim_4396 a întrebat:

am o mica intrebare, cam cat timp mi-ar lua ca sa invat JavaScript la un nivel inalt, mentionez ca stiu HTML, CSS si pe langa astea invat C++ la scoala. Prin invatat ma refer sa pot intelege macar un astfel de cod:
"
(function(c){function m(a, c, d){if((a[c]||a[d])&&a[c]===a[d])throw Error("(Link) '"+c+"' can't match '"+d+"'.'");}function r(a){void 0===a&&(a={}); if("object"!==typeof a)throw Error("(Format) 'format' option must be an object."); var h={}; c(u). each(function(c, n){if(void 0===a[n])h[n]=A[c]; else if(typeof a[n]===typeof >A[c]){if("decimals"===n&&(0a[n]||7a&&(n=this.a("negative "),k=this.a("negativeBefore")); a=Math.abs(a).toFixed(d). toString(); a=a. split("."); this.a("thousand")?(m=c(a[0]).match(/.{1,3}/g),m=c(m.joi n(c(this.a("thousand"))))):m=a[0]; this.a("mark")&&1")[0]}; k.prototype.H=function(a){this.method="val"; this.j=document.createElement("input"); this.j.name=a; this.j. type="hidden"}; k.prototype.G=function(a){function h(a, c){return[c? null:a, c? a:null]}var d=this; this.method="val"; this. target=a.on("change", function(a){d.B.val(h(c(a.target).val(),d.t),{link:d,set :! 0})})}; k.prototype.p=function(a,h,d,k){this.g=d; this. update=! k; if("string"===
typeof a&&0===a.indexOf("-tooltip-"))this.K(a,h); else if("string"===typeof a&&0!==a.indexOf("-"))this.H(a); else if("function"===typeof a)this. target=! 1, this.method=a; else{if(a instanceof c||c. zepto&&c.zepto.isZ(a)){if(! h){if(a.is("input, select, textarea")){this.G(a); return}h="html"}if("function"===typeof h||"string"===typeof h&&a[h]){this.method=h; this. target=a; return}}throw new RangeError("(Link) Invalid Link.");}}; k.prototype.write=function(a,c,d,k){if(! this. update||! 1!==k)if(this.u=a, this.F=a=
this.format(a),"function"===typeof this.method)this.method.call(this.target[0]||d[0],a,c,d) ; else this. target[this.method](a,c,d)}; k.prototype.q=function(a){this.g=new r(c. extend({}, a, this.g instanceof r? this.g.r:this.g))}; k.prototype.J=function(a){this.B=a}; k.prototype.I=function(a){this.t=a}; k.prototype.format=function(a){return this.g.L(a)}; k.prototype.A=function(a){return this.g.w(a)}; k.prototype.p.prototype=k.prototype; c.Link=k})(window.jQuery||window.Zepto);/*

$.fn.noUiSlider - WTFPL - refreshless.com/nouislider/ */
(function(c){function m(e){return"number"===typeof e&&! isNaN(e)&&isFinite(e)}function r(e){return c.isArray(e)? e:[e]}function k(e, b){e.addClass(b); setTimeout(function(){e.removeClass(b)},300)}function u(e, b){return 100*b/(e[1]-e[0])}function A(e, >b){if(b=e.d.slice(-1)[0])return 100; for(var a=1, c,f, d; >b=e.d[a]winkinga++; c=e.d[a-1]; f=e.d[a]; d=e.c[a-1]; c=[c, f]; return d+u(c, >0c[0]? b+Math.abs(c[0]):b-c[0])/(100/(e.c[a]-d))}function a(e, b){if(100=e.c[a]winkinga++; c=
e.d[a-1]; f=e.d[a]; d=e.c[a-1]; c=[c, f]; return 100/(e.c[a]-d)*(b-d)*(c[1]-c[0])/100+c[0]}function h(a, b){for(var c=1, g;(a.dir? >100-b:b)=a.c[c]winkingc++; if(a.m)return >g=a.c[c-1],c=a.c[c],b-g(c-g)/2? c:g; a.h[c-1]?(g=a.h[c-1],c=a.c[c-1]+Math.round((b-a.c[c-1])/ g)*g):c=b; return c}function d(a, b){if(! m(b))throw Error("noUiSlider: 'step' is not numeric."); a.h[0]=b}function n(a, b){if("object"!==typeof b||c.isArray(b))throw Error("noUiSlider: 'range' is not an object."); if(void 0===b.min||void 0===b.max)throw Error("noUiSlider: Missing 'min' or 'max' in 'range'.");
c. each(b, function(b, g){var d;"number"===typeof g&&(g=[g]); if(! c.isArray(g))throw Error("noUiSlider: 'range' contains invalid value."); d="min"===b? 0:"max"===b? 100:parseFloat(b); if(! m(d)||! m(g[0]))throw Error("noUiSlider: 'range' value isn't numeric."); a.c. push(d); a.d. push(g[0]); d? a.h.push(isNaN(g[1])?! 1:g[1]):isNaN(g[1])||(a.h[0]=g[1])}); c. each(a.h,function(b,c){if(! c)return! 0; a.h[b]=u([a.d[b],a.d[b+1]],c)/(100/(a.c[b+1]-a.c[b]))})} function E(a, b){"number"===typeof b&&(b=[b]); if(! c.isArray(b)||! b. length||
2").addClass(f[2]),g=["-lower","-upper"]; a.dir&&g.reverse(); d.children().addClass(f[3]+" "+f[3]+g[b]); return d}function Q(a, b){b.j&&(b=new c.Link({target:c(b.j).clone().appendTo(a),method:b.metho d,format:b.g},! 0)); return b}function R(a, b){var d, f=[]; for(d=0; d"). appendTo(b). addClass(f[1])}function V(d,b, m){function g(){return t[["width","height"][b.k]]()}function n(a){var b, c=[q.val()]; for(b=0; bp&&(p=h(b, p)); p=Math.max(Math.min(parseFloat(p.toFixed(7)),100),0); if(p===x[g])return 1===l. length?! 1:p===H||p===k? 0:! 1; d.css(b.style,p+"%"); d.is(":first-child")&&d.toggleClass(f[17],50d&&(e+=Math. abs(d)),100

11 răspunsuri:
anonim_4396
| anonim_4396 explică:

Mor laughing))))))
Si eu ma uitam la site-uri de genul, cu cod ca ala.dar nu e scris de cineva...Cred ca e facut de ceva framework, gen React.

| anonim_4396 explică (pentru anonim_4396):

Si cred ca e JavaScript ala.

| anonim_4396 explică (pentru anonim_4396):

E cod, l-am luat dintr-un site, de la un slide.

| anonim_4396 explică (pentru anonim_4396):

E un cod, da, dar NU E SCRIS DE CINEVA...presupun ca e generat de vreun framework precum React sau ceva de genul.
In orice caz nu e scris de cienva, iti garantez 100%.

| anonim_4396 explică (pentru anonim_4396):

Http://downloads.mailchimp.com/js/signup-forms/popup/embed.js
Mai mult acolo. :D

| suntserios a răspuns (pentru anonim_4396):

E cod scris de cineva doar ca e minifiat si nu prea il poti citi usor. Plus nici macar nu e identat cum ttebuie sa fie inteligibil.

Pentru Cezar... iti va lua ceva timp sa inveti js pur pentru ca e un limbaj complicat si ceva diferit de restul. Cu studiu constant macar un an.

| anonim_4396 explică (pentru suntserios):

Nup, eu nu cred ca e cod scris de cineva.

| anonim_4396 explică (pentru anonim_4396):

Bine, cel de sus pare a avea sanse sa fie scris de cineva, se intelege ceva cat decat din el.
Dar nu si din link-ul ala pe care l-am.

| anonim_4396 explică (pentru anonim_4396):

Da, m-am uitat mai atent la cel de sus..acum sunt de acord cu tine.

| suntserios a răspuns (pentru anonim_4396):

E cod minifiat, e normal ca nu intelegi.mare lucru

| anonim_4396 explică (pentru suntserios):

Ba se intelege, prima data nu am l-am analizat destul.