>
> You need to copy the reference to your link to a variable like this:
>
> jQuery('#yt1').click(function(){
> $(this).replaceWith("Approving...");
> var aObj = $(this);
if you are going to suggest this, go ahead and teach a good practice
of not creating a new jq object unnecessarily:
.click(
hitch could do this.
http://higginsforpresident.net/js/jq.hitch.js
http://higginsforpresident.net/js/jq.hitch.min.js
...
'success': jQuery.hitch(this, function(msg){
alert($(this).attr('id'));
}),
...
Regards
On Fri, May 1, 2009 at 12:48 PM, phpdevmd wrote:
>
> Hello, I have the following
$(this).animate({ width: mywidth + "px" });
think:
var newwidth = {
"width": mywidth + "px"
}
Regards
On Thu, Apr 30, 2009 at 5:54 PM, paper_robots wrote:
>
> I'm trying to get the width of an element, animate it bigger, then
> shrink it back to normal size on hover. Here's my function:
>
ge");
this._input.bind('change', cb).ubind('change', cb);
Again, pardon my ignorance of the bind/unbind pattern.
Regards,
Peter
On Fri, Apr 10, 2009 at 5:52 AM, Azat Razetdinov wrote:
>
>> this._input.bind('change', $.hitch(this, "_onInputChan
My hitch() method does this kind of:
http://higginsforpresident.net/js/jq.hitch.js
It would look like:
this._input.bind('change', $.hitch(this, "_onInputChange"));
Regards,
Peter Higgins
On Wed, Apr 8, 2009 at 12:03 PM, gregory wrote:
>
> the only difficulty I am having with
> Balazs Endresz
> .css({
> 'display': 'block',
> 'text-align': 'right',
> })
stray comma, after 'right'
http://jslint.com
Regards,
Peter
Yet another opportunity to mention my hitch plugin (which is .bind in prototype)
http://higginsforpresident.net/js/jq.hitch.js
http://higginsforpresident.net/js/jq.hitch.min.js
Regards,
Peter
On Tue, Mar 3, 2009 at 8:51 PM, Karl Rudd wrote:
>
> First a solution for you. Try this plugin:
>
>
I never miss an opportunity to mention my uberuseful tiny [and only]
jQuery plugin. "hitch"
http://higginsforpresident.net/js/jq.hitch.js
http://higginsforpresident.net/js/jq.hitch.min.js
Regards,
Peter
On Wed, Feb 25, 2009 at 4:58 PM, Nic Hubbard wrote:
>
> Thank you. I appreciate the explan
You would need to find whatever quirk it is you are targeting and
create a function or otherwise create a scenario where that quirk is
exposed, and use that to populate some identifier.
eg: jQuery detects support.opacity by creating a and then later testing the opacity value or lack
thereof.
I
moving the above the
I still like the rescope function. :)
http://groups.google.com/group/jquery-en/browse_thread/thread/43644231b5764f12?q=rescope+jquery#ca1b1069580a3f25
On Sat, Feb 7, 2009 at 8:03 PM, Karl Rudd wrote:
>
> Assign "this" to a local variable.
>
> function blah() {
> var blahThis = this;
> someEx
I'm inclined to agree. Having a good foundation of JavaScript before
adopting any library will do these students a much greater service
than simply teaching them an API that is already relatively easy to
learn. Teach them JS, and in places where is really matters, show them
how JQ (or the other li
There are none. Dojo only takes a few globals for the namespace, and
doesn't use $ for anything. There is no bad influence, other than the
duplication in functionality between base dojo.js and jquery.js
On Tue, Jan 6, 2009 at 10:27 AM, aldana wrote:
>
> hi,
>
> we are using jquery but we need fu
Because I'm an advocate for licensing and was told I probably should
mention: the 'rescope' function is a stripped down version of Dojo's
dojo.hitch function. Infinitely useful in the real world, but
technically if used [in production] should retain attribution. It is
available under new BSD and
Here is your orig snippet rewritten to use the rescope function I pasted:
var datascape = {
'mouseX': 0,
'myInterval': 0,
'create': function(){
$('#datascape').bind('mousemove', rescope(this, function(e)
{
this.mouseX = e.pageX;
})).bind("mouseover", rescope(t
I've always found this bit of code useful:
var rescope = function(scope, method){
if(!method){ method = scope; scope = null; }
if(typeof method == "string"){
scope = scope || window;
if(!scope[method]){ throw(['method not found']); }
t; a = { toString:null };
> b = {};
> b[a] = 'test'; // TypeError: can't convert a to string
>
> All this is quite different from, say, Ruby, where any object *can* be used
> as a hash key:
>
> irb(main):001:0> a = { 'a' => 'b',
> and, yeah, I usually put in bare keys (sans quotes) unless necessary, too.
> Not sure why. I guess I just like the clean look.
Yah, they just seem to be wasted bytes, huh?
One thing to note, and the only reason I try to force myself to use
the quotes is for portability. If the data is "really"
t;,
"this-is":"valid also" }
of course, we should mention accessing them too:
foo["1bar"], foo["this-is"] and foo._iam
Regards,
Peter Higgins
On Wed, Dec 31, 2008 at 9:34 AM, Karl Swedberg wrote:
> On Dec 31, 2008, at 7:51 AM, pete higgins wrote:
>
>
>// YUI compressor won't compress if you have no quotes on keywords
>float: function() {
>alert("float");
>},
>int: function(){
>alert("int");
>}
> }
>
> a.float();
> a.int();
int and float are reserved words as well. Technic
your onend callback is being executed immediately (with the ()'s). you
likely want:
$(...).animate({ props }, 2000, "linear", function(){
scroll_list(h);
});
to pass an anonymous function that will execute later (2000ms).
Regards
Peter Higgins
On Mon, Oct 27, 2008 at 6:01 AM, gattu_marr
Not offhand. In theory, mouse down triggers the bind(mousemove) and
mouse up unbind's it, so you should not be seeing that behavior.
There is a small typo in the args/invert checking above, i randomly
added after pasting my test page into the email.
var invert = (args ? (args.invert || false) :
here's a stab.
use it the same as the link wrt the html/css, and then
$("#mydiv").DragPane({}); or
$("#mydiv").DragPane({ invert: true }); if the backwardness of it is
annoying to you.
leaving off the scrollbars would be a matter of styling the #myDiv
node overflow:hidden
jQuery.fn.DragPane = f
One way would be to put two block elements in a third that has
position:relative and the children each have position:absolute; top:0;
left:0; and the one with text has a higher zIndex. Fade out the "underlay",
leaving the content?
On Dec 4, 2007 5:25 PM, jonhobbs <[EMAIL PROTECTED]> wrote:
>
> H
24 matches
Mail list logo