Hello,
I tried to get the current scene-title and want to show() and hide() div´s with the ID of the scene-title.
eg. having following html:
|
Quellcode
|
1
2
|
<div id="scene1"></div>
<div id="scene2"></div>
|
And when scene1 will be loaded the div#scene1 should be shown.
I tried to test:
XML:
|
Quellcode
|
1
2
3
|
<action name="startactions">
js( showtitle(get(scene[get(xml.scene)].title)) );
</action>
|
jQuery
|
Quellcode
|
1
2
3
4
5
|
$(document).ready(function() {
function showtitle(scenetitle) {
alert(scenetitle);
}
};
|
But the alert doesnt work ant krpano says:
WARNING: js() - calling Javascript "showtitle(get(scene[get(xml.scene)].title))" failed: Error: ReferenceError: showtitle is not defined
What´s the problem here? Because for me it looks that showtitle() is defined, but I am a JS-Newbie :)
Best regards,
Marc