Skip to main content
Stack Overflow
  1. About
  2. For Teams

Return to Question

edited tags
Source Link
Dave Newton
  • 160.5k
  • 27
  • 264
  • 311

https://docs.google.com/file/d/0BzVXz9FRg0DWV3R0WUR2cTd5U00/edit

I need to call the function from the javascript linked above in my userscript. My code where I need the function looks like this:

jQuery(document).ready(function($) {
 $('.color1').colorPicker();
});

I tried:

var decolorpicker = '<script type="text/javascript" scr="www.drive.google.com/file/d/0BzVXz9FRg0DWV3R0WUR2cTd5U00/edit?usp=sharing"></script>'
$("script[src*='merged/game']").after(decolorpicker);

And then:

window.colorPicker(); 

WichWhich gives the error:

Uncaught exception: TypeError: 'window.colorPicker' is not a function

Uncaught exception: TypeError: 'window.colorPicker' is not a function

How can I do this correctly?

https://docs.google.com/file/d/0BzVXz9FRg0DWV3R0WUR2cTd5U00/edit

I need to call the function from the javascript linked above in my userscript. My code where I need the function looks like this:

jQuery(document).ready(function($) {
 $('.color1').colorPicker();
});

I tried:

var decolorpicker = '<script type="text/javascript" scr="www.drive.google.com/file/d/0BzVXz9FRg0DWV3R0WUR2cTd5U00/edit?usp=sharing"></script>'
$("script[src*='merged/game']").after(decolorpicker);

And then:

window.colorPicker(); 

Wich gives the error:

Uncaught exception: TypeError: 'window.colorPicker' is not a function

How can I do this correctly?

https://docs.google.com/file/d/0BzVXz9FRg0DWV3R0WUR2cTd5U00/edit

I need to call the function from the javascript linked above in my userscript. My code where I need the function looks like this:

jQuery(document).ready(function($) {
 $('.color1').colorPicker();
});

I tried:

var decolorpicker = '<script type="text/javascript" scr="www.drive.google.com/file/d/0BzVXz9FRg0DWV3R0WUR2cTd5U00/edit?usp=sharing"></script>'
$("script[src*='merged/game']").after(decolorpicker);

And then:

window.colorPicker(); 

Which gives the error:

Uncaught exception: TypeError: 'window.colorPicker' is not a function

How can I do this correctly?

Source Link
user3117628
  • 786
  • 2
  • 15
  • 36

Javascript using external function

https://docs.google.com/file/d/0BzVXz9FRg0DWV3R0WUR2cTd5U00/edit

I need to call the function from the javascript linked above in my userscript. My code where I need the function looks like this:

 jQuery(document).ready(function($) {
 $('.color1').colorPicker();
 });

I tried:

 var decolorpicker = '<script type="text/javascript" scr="www.drive.google.com/file/d/0BzVXz9FRg0DWV3R0WUR2cTd5U00/edit?usp=sharing"></script>'
 $("script[src*='merged/game']").after(decolorpicker);

And then:

 window.colorPicker(); 

Wich gives the error:

Uncaught exception: TypeError: 'window.colorPicker' is not a function

How can I do this correctly?

lang-js

AltStyle によって変換されたページ (->オリジナル) /