简体   繁体   English

在我的jQuery插件的实例上调用函数

[英]calling a function on an instance of my jQuery plugin

I'm new to jQuery. 我是jQuery新手。 I have a plugin that draws a chart on an html canvas. 我有一个可在html画布上绘制图表的插件。 I'd like to change some chart settings in response what the user selects in some other html controls on the page. 我想更改一些图表设置以响应用户在页面上的其他html控件中选择的内容。 I need a way to call a function on my plugin with a new parameter, passing control to the plugin so I can redraw it. 我需要一种使用新参数在插件上调用函数的方法,并将控制权传递给插件,以便重新绘制插件。

How to I code this function on my plugin? 如何在插件上编写此功能?

Thanks, Gerry 谢谢,格里

You can try the argument onclick 您可以尝试参数onclick

http://www.w3schools.com/jsref/event_onclick.asp http://www.w3schools.com/jsref/event_onclick.asp

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM