开发者

Changing displayed image from several thumbnails on a sidebar with javascript/jQuery?

开发者 https://www.devze.com 2023-02-28 13:12 出处:网络
I have a page where I curr开发者_开发知识库ently display a large plot (made with jqplot), and then a sidebar with a range of smaller plots.

I have a page where I curr开发者_开发知识库ently display a large plot (made with jqplot), and then a sidebar with a range of smaller plots.

What I'd like to be able to do is to change the large displayed plot based on whichever of the smaller plots the user clicked on (without having to reload the page).

I have been searching around online for a while with no luck, and hoped someone would be able to point me in the right direction!

Thanks in advance!


When you have your new data simply initialize a new plot with the new data.

function onSomeEvent() {
    chart = $.jqplot('chart', newDataSeries, newOptionsObj);
}
0

精彩评论

暂无评论...
验证码 换一张
取 消