Thanks, guys, for bringing this to the attention of the discussion list. I'm at a loss as to how to fix it.

If anyone else has a suggestion, please advise. Here is the bookmarklet script, after reformatting for legibility:

(function() {
  var s = document.createElement('script');
s.setAttribute('src','http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.js') ;

  if(typeof jQuery!='undefined') {
    var msg = 'This page already using jQuery v'+jQuery.fn.jquery;
  } else {
    document.getElementsByTagName('head')[0].appendChild(s);
    var msg='This page is now jQuerified';
  }

var el = document.createElement('div');
    el.style.position = 'fixed';el.style.height='30';
    el.style.width = '200';el.style.margin='0 auto 0 auto';
    el.id = 'jq-kswedberg';el.style.top='0';
    el.style.left = '40%';el.style.padding='5px 10px 5px 10px';
    el.style.backgroundColor = '#f99';
    el.innerHTML = msg;

  var b=document.getElementsByTagName('body')[0];
  b.appendChild(el);

  window.setTimeout(function() {
    jQuery('#jq-kswedberg').fadeOut('slow',function() {
      jQuery(this).remove()
    });
  }, 2500);
})();


Thanks!

--Karl
____________
Karl Swedberg
www.englishrules.com
www.learningjquery.com




On Jul 18, 2008, at 12:14 PM, Raphael Saunier wrote:


Hi Sam,
I'm having the exact same problem when I try to "inject" jQuery using
that bookmarklet on certain sites (e.g.: reddit.com, livejournal.com,
etc...). Obviously, the cause of the problem is the JavaScript code
already on the site. All of these sites have messed with the
"Object.prototype" and/or the  "Function.prototype" and this is what I
think is causing problems. But I don't know how that could be fixed...

Let me know if you find a solution...

On Jul 14, 3:13 pm, Sam Dark <[EMAIL PROTECTED]> wrote:
Hello, everyone!

I need some help.

I'm trying to inject jQuery into the page using a bookmarklet (http://www.learningjquery.com/2006/12/jquerify-bookmarklet ).

It works with all pages except this 
one:http://www.laist.com/2008/02/08/bansky_banksy_a.php

giving me

"jQuery(window).bind is not a function" error.

Any suggestions?

Reply via email to