You are not logged in.


Wednesday, June 22nd 2016, 12:36pm

Showtext plugin question

Hello all!
Have a small question.
I use showtext plugin for showing hotspot cards like text cards on yandex or google maps. Right now i want to use it by clicking on hotspot.

Source code

krpano.set("hotspot[" +[i].id + "].ondown", "showtext(" +					"[div style='padding: 5px 10px']" +						"[h2 style='width: 100%; margin: 0;']" +[i].name + "[/h2][br]" +						"[img style='width: 100%' src='" +[i].pic + "'  alt='' /][br]" +					"[/div]  ,CARDSTYLE)");

It works with "onhover" but when i click on it with "onclick" it shows and immideatly dissapears. How can i get it work? How can i use onclick with showtext work on it, and how can i close showtext plugin when i tap on it?


Wednesday, June 29th 2016, 11:29am


the showtext() action isn't made for such.

It immediately disappears because the default showtime value is 0.1 seconds:

For showing a text on click and hiding it on another click on it, the textfield plugin should be used:

Best regards,