I am trying to use the clickHandlerFunc to open a Modal box. I am getting the error "Uncaught TypeError: a.clickHandlerFunc is not a function at HTMLDivElement. (pannellum.js:68)"
The following is my codes:
"hotSpots": [
{
"pitch": 1.60311491347256,
"yaw": 22.349004691308146,
"type": "scene",
"text": '',
"sceneId": "",
"clickHandlerFunc": "openModal"
},
function openModal() {
$(".popup-overlay, .popup-content").addClass("active");
}
How can I resolve the problem? I need to open a modal box when the hotspot is clicked.
Try the following out...
first define the function you wish to call before the call to pannellum, for example..
Then the line for the click handler should be...
i.e. without the quotes.
Substitute the alert("hello") for whatever function call or code that you like.