Questions tagged [resig]

John Resig is an American software engineer and entrepreneur, best known as the creator and lead developer of the jQuery JavaScript library.

11 questions
32
votes
5 answers

What is a selector engine?

I've seen news of John Resig's fast new selector engine named Sizzle pop up in quite a few places, but I don't know what a selector engine is, nor have any of the articles given an explanation of what it is. I know Resig is the creator of jQuery,…
pbh101
  • 10,203
  • 9
  • 32
  • 31
15
votes
3 answers

Improving Simple JavaScript Inheritance

John Resig (of jQuery fame) provides a concise implementation of Simple JavaScript Inheritance. His approach inspired my attempt to improve things even further. I've rewritten Resig's original Class.extend function to include the following…
Will
  • 375
  • 1
  • 4
  • 13
7
votes
1 answer

Weird regex in inherit.js (by John Resig) - why, what and how?

I recently used a little utility library by John Resig, called inherit.js. I usually try to understand the core parts of the libraries I am using, and after a lot of head scratching I finally understood the hard bits of the code (namely how he could…
oligofren
  • 20,744
  • 16
  • 93
  • 180
4
votes
1 answer

Getting the class name to show up in the console when using Resig's Simple JavaScript Inhertiance

I'm using Resig's Simple JavaScript Inheritance to create my classes. The only thing I don't like about it so far is that when I log an object created with this library to the console, it's name is simply "Class". My question is whether there is a…
maxedison
  • 17,243
  • 14
  • 67
  • 114
2
votes
2 answers

can you use call or apply with new?

related to How can I call a javascript constructor using call or apply? but not the same, I'm trying to apply the SO answers to John Resig's forcing a constructor when not called properly. function User(first, last){ if ( !(this instanceof User)…
Maslow
  • 18,464
  • 20
  • 106
  • 193
1
vote
2 answers

Using John Resig's "simple JavaScript inheritance" how can I call a super method PLUS extra code from within a method?

I decided to try out JavaScript genius John Resig's "simple JavaScript inheritance" as detailed on this blog page: http://ejohn.org/blog/simple-javascript-inheritance/ I'm curious how one might override a method with code that calls the super…
natlee75
  • 5,097
  • 3
  • 34
  • 39
1
vote
1 answer

John Resigs Micro Templating vs JQuery Templates or others?

I've been using John resigs neat micro templating javascript on a project I'm working on. The project pulls down a JSOn object and spits out a table with a bunch of input fields like so: This works ok, however in IE it's slow and locks up the…
RodH257
  • 3,552
  • 5
  • 36
  • 46
1
vote
2 answers

explanation about prototype.js function binding code

From: http://ejohn.org/apps/learn/#2 Function.prototype.bind = function(){ var fn = this, args = Array.prototype.slice.call(arguments), object = args.shift(); return function(){ return fn.apply(object, …
resopollution
  • 19,600
  • 10
  • 40
  • 49
0
votes
1 answer

Why does John Resig re-declare the original _super, after using inherited _super?

Taken from: https://stackoverflow.com/a/15052240/1487102 Scroll down to see the lines I'm curious about It makes sense that he declares the inherited function this._super before applying What I don't get is: after he executes the function and gets…
neaumusic
  • 10,027
  • 9
  • 55
  • 83
0
votes
2 answers

jquery - how to make an iframe from a script i found into an ajax injection?

I'm wondering how i would change this appended iframe: $("#GB_window").append(""); into a div. Is there a way to change this so that i'm not appending an iframe, but instead using ajax? I need to be…
ExodusNicholas
  • 1,634
  • 5
  • 15
  • 18
0
votes
1 answer

Resig's Live Search redux for jQuery 1.7 and above?

I recently found Resig's jQuery rewrite of a Quicksilver Live Search and love the workings of it... but I'm trying to update it to work with the new .on() event handler. However my abilities (or lack thereof) fail me. I'm thinking I need to edit the…
rbt
  • 33
  • 6