> It's a tricky line to balance. We either get to replace 1.1.2 and
> cause some possible confusion with Safari issues (for users who
> upgraded very quickly) or push out 1.1.3 and cause more confusion
> having two releases occur in just a couple hours.
Where would be the confusion if the changelo
> I keep all my behaviours in separate functions. For instance if I
> had a fancy table widget I'd have a function called initTable()
> that contained the behaviour code. I'd call it initially upon page
> load, then call it again when necessary if content has been updated
> via ajax.
> [...
>> Untested, but reading the code I assume this would work:
>>
>> $("#something").ajaxSuccess(fn);
>>
>> function fn(r, s) {
>> $(this).unbind("ajaxSuccess");
>> // do what you want, then rebind
>> $(this).ajaxSuccess("fn");
>> }
>
> It seems unbind doesn't work on ajaxSuccess or ajaxStop...
> Untested, but reading the code I assume this would work:
>
> $("#something").ajaxSuccess(fn);
>
> function fn(r, s) {
> $(this).unbind("ajaxSuccess");
> // do what you want, then rebind
> $(this).ajaxSuccess("fn");
> }
It seems unbind doesn't work on ajaxSuccess or ajaxStop...
-Nicolas
> $().ready(function(){
> $().ajaxStart($.blockUI).ajaxStop($.unblockUI);
> });
Maybe ajaxStop is better than ajaxSuccess for my needs, but I don't
need to block the UI.
-Nicolas
--
Nicolas "Brush" HOIZEY
Clever Age : http://www.clever-age.com/
Gastero Prod : http://www.gasteroprod.com/
Ph
> You can use ajaxSuccess but go ahead and take advantage of the
> settings object. Something like:
>
> $().ajaxSuccess(function(e, xhr, settings) {
> if (settings.myTag) return;
> // do your extra work and call ajax
> $.ajax({
> myTag: 1,
> url: blah.php,
> typ
In a page that gets modified by ajax calls, I would like to run my
own function after each change.
My function does ajax calls, so if I use the ajaxSuccess binding, it
goes recursively and crash...
Any idea?
-Nicolas
--
Nicolas "Brush" HOIZEY
Clever Age : http://www.clever-age.com/
Gast
> $('li.expandable:not("[a.on]")')
>
> A couple things to note:
> 1. you don't need to repeat "li.expandable" inside the ":not"
I think it is "you MUST NOT repeat"... ;)
-Nicolas
--
Nicolas "Brush" HOIZEY
Clever Age : http://www.clever-age.com/
Gastero Prod : http://www.gasteroprod.com/
Phot
>>> var select = $('[EMAIL PROTECTED] myselect]');
>>> var cachedOnChange = select[0].onchange;
>>
>> I get the onchange in a function, great!
>>
>>> select[0].onchange = null;
>>
>> What is the difference between this and unbind('change') or
>> removeAttr
>> ('onchange')?
>
> I just found that a
>> var select = $('[EMAIL PROTECTED] myselect]');
>> var cachedOnChange = select[0].onchange;
>
> I get the onchange in a function, great!
>
>> select[0].onchange = null;
>
> What is the difference between this and unbind('change') or removeAttr
> ('onchange')?
I just found that althrough it works
> You just need to get the "this" object set, which you can do this way:
>
> select.bind('change', function() {
> if (confirm('Are you sure?')) {
> cachedOnChange.apply(this);
This is amazing, I discover JavaScript every day. Thanks a lot!
-Nicolas
--
Nicolas "Brush" HOIZEY
Cl
>> select.bind('change', function() {
>> if (confirm('Are you sure?')) {
>> cachedOnChange();
>
> The function uses 'this', which is not "available" anymore when I
> call it...
I did this:
select.onchange = cachedOnChange;
select.onchange();
And it seems to work well!
I'm not sure
> I think you don't have to use eval..., I'd try this:
>
> var select = $('[EMAIL PROTECTED] myselect]');
> var cachedOnChange = select[0].onchange;
I get the onchange in a function, great!
> select[0].onchange = null;
What is the difference between this and unbind('change') or removeAttr
('onc
No idea?
Le 9 févr. 07 à 10:07, Nicolas Hoizey a écrit :
> Hello,
>
> Let's say I have the folowing code I can't change (it's not mine) :
>
> onchange="this.nextSibling.visibility='hidden';">
> One
> Two
>
>
> How
Hello,
Let's say I have the folowing code I can't change (it's not mine) :
One
Two
How can I put my own "change" event handler, but being able to run
the original one as well?
I tried that :
$(document).ready(function() {
var currentOption = $('[EMAIL PROTECTED] mys
> In order to get jQuery to work with greasemonkey, the document.ready()
> code needs to be removed. This is ok because by the time greasemonkey
> is run, the page has already finished loading so we do not need this
> event to be called. Find below the code removed from jQ 1.1.1
Thanks!
-Nicolas
> Nicolas emailed me, and I felt it was somewhat my duty/
> responsibility to get jQuery to work in greasemonkey again, so here
> it is!
> jQuery 1.1.1 -- http://userscripts.org/scripts/show/7373
It works so well, thank you a lot! Could you just explain here what
you did, so that everyone c
> I'm wondering if there is a way to rewrite the url in the browser bar
> without refreshing the page.
You can only modify the anchor (after the #), as it is done by some
Ajax and Flash sites.
-Nicolas
--
Nicolas "Brush" HOIZEY
Clever Age : http://www.clever-age.com/
Gastero Prod : http://
>> maybe you could insert jquery by adding a generated
sions
>> but that
>> would seem to be the best way in terms of bandwidth and in terms of
>> usability (you wouldn't need to add a dynamic script load to every
>> page
>> load just to use jQuery in your user scripts)
>>
>> -blair
>>
>&g
> I would guess that the best way would be to pack the jQuery source
> into
> the greasemonkey xpi and access it using the chrome URI interface
> somehow. I have very limited experience with firefox extensions but
> that
> would seem to be the best way in terms of bandwidth and in terms of
> us
ecome
noticeable.
John, am I right, or do you authorize such bandwidth "abuse"?
-Nicolas
> On 1/30/07, Nicolas Hoizey <[EMAIL PROTECTED]> wrote: Hello,
>
> I want to improve some of my Greasemonkey scripts by using jQuery
> instead of "traditionnal" JS.
&g
Hello,
I want to improve some of my Greasemonkey scripts by using jQuery
instead of "traditionnal" JS.
I tried to load the library during execution[1] and it didn't work as
intended. It was loaded from jquery.com, so I didn't want it anyway.
I can't load it from my host either.
I found a w
23 matches
Mail list logo