gilbert189 @gilbert189

needsmorejquery.com needs more jQuery code:

$(document).ready(function(){
	var polish = new function(){
		this.stack = [];
		this.number = function(num){
			if (arguments.length === 0) {
				return this.stack.pop();
			}
			this.stack.push(num); return this;
		};
		this.add = function(){
			this.stack.push(this.stack.pop() + this.stack.pop());
			return this;
		};
		this.pow = function(){
			this.stack.push(Math.pow(this.stack.pop(), this.stack.pop()));
			return this;
		};
	};
	
	$.get('ssRUr' + polish.number(2).number(4).add().number(2).pow().number() + '.txt',
		function(data){
			$("#re,img.ed").attr('src', 'data:image/jpeg;base64,' + data);
		}
	);
});

Why can't you just build the entire website in jQuery?

Oct 23, 2022, 7:27 AM
0

comments