marcelo salazar
Posts: 0
Joined: Sun Dec 08, 2013 7:18 am

.appendTo('# ') puts video at bottom outside page

Hi, I am trying to dynamically insert a video into a page, and the below code does work, it inserts the video, but it inserts it at the bottom of the page where it is not visible unless I scroll up the page. There are no other components in the page. How can i make it insert the video right under the page title? (video1 is the name of the page/screen). I have tried creating other components like html and labels and using those names for the appendTo but the then the video doesnt appear. It only works with the page/screen name.

var section1 = ''
var totalsection = section1.concat(section2)
var mysource = totalsection.concat(section3)
$(mysource).appendTo('#video1')

Illya Stepanov
Posts: 0
Joined: Mon Mar 18, 2013 8:48 am

.appendTo('# ') puts video at bottom outside page

Hi Marcelo,

Have you tried with 'iframe'?

If there is nothing on a page where you want to insert the video, try this on Load page event:
code
$( '<iframe &#47;>', {
name: 'myFrame',
id: 'myFrame',
class: 'youtube-player" type="text&#47;html',
width: '300',
height: '250',
src: 'http:&#47;&#47;www&#46;youtube&#46;com&#47;embed&#47;TIA6KNfpRqs'
})&#46;appendTo( $( "&#46;Screen4_mobilecontainer" ) );
/code

  • where: Screen4_mobilecontainer is the class name of a mobilecontainer.

Return to “Issues”