Skip to main content
AP_AW
Inspiring
October 12, 2016
Question

Using JS to get a slide's elements

  • October 12, 2016
  • 1 reply
  • 429 views

I can do this to get the elements in/on a slide

...

eventEmitterObj.addEventListener("CPAPI_SLIDEENTER", function(e) {

  var elems = e.Data.si;

};

but I need to get the elements in a JavaScript function independent from the slide enter event. Is there some other variable of object I can query to get the elements?

This topic has been closed for replies.

1 reply

TLCMediaDesign
Inspiring
October 12, 2016

Can you explain in more detail?

What are you trying to do?

You can get the si property of any slide. You must first access the slide in question through cp.model.data.project_main.slides

Inspiring
October 12, 2016

How do I get a slide's number using its label so that I can later call a

function to jump to it?

TLCMediaDesign
Inspiring
October 12, 2016

You would need to loop through all of the slides and get the lb property, if it matches the label you are looking for, store the index in the variable.