Jump to content

These Forums Are Now Read-Only

For TubePress support, please post a question here or open a support ticket and we will be glad to assist.


Moving the embed code location breaks ajax

  • Please log in to reply
No replies to this topic

#1 Aaron Fronk

Aaron Fronk


  • Members
  • Pip
  • 1 posts

Posted 23 August 2011 - 03:07 PM

Hi, thanks for tubepress, looks great.

I've edited my template and moved some things around, but now in using AJAX to retrieve my videos, when I click a thumbnail, the video does not update to the one that was clicked on. I presume this is because jQuery cannot find the id of the embedded object. My question is - based on the template below, where do I adjust the javascript to get it working again?

<?php echo ${org_tubepress_api_const_template_Variable::PLAYER_HTML}; ?>
<?php get_sidebar(); ?>

<div class="tubepress_container" id="tubepress_gallery_<?php echo ${org_tubepress_api_const_template_Variable::GALLERY_ID}; ?>">
  <div id="tubepress_gallery_<?php echo ${org_tubepress_api_const_template_Variable::GALLERY_ID}; ?>_thumbnail_area" class="tubepress_thumbnail_area">
    <?php if (isset(${org_tubepress_api_const_template_Variable::PAGINATION_TOP})) : echo ${org_tubepress_api_const_template_Variable::PAGINATION_TOP}; endif; ?>

    <div class="tubepress_thumbs">
        <?php foreach (${org_tubepress_api_const_template_Variable::VIDEO_ARRAY} as $video): ?>
      <div class="tubepress_thumb">
        <a id="tubepress_image_<?php echo $video->getId(); ?>_<?php echo ${org_tubepress_api_const_template_Variable::GALLERY_ID}; ?>" rel="tubepress_<?php echo ${org_tubepress_api_const_template_Variable::EMBEDDED_IMPL_NAME}; ?>_<?php echo ${org_tubepress_api_const_template_Variable::PLAYER_NAME}; ?>_<?php echo ${org_tubepress_api_const_template_Variable::GALLERY_ID}; ?>"> 
          <img alt="<?php echo htmlspecialchars($video->getTitle(), ENT_QUOTES, "UTF-8"); ?>" src="<?php echo $video->getThumbnailUrl(); ?>" width="<?php echo ${org_tubepress_api_const_template_Variable::THUMBNAIL_WIDTH}; ?>" height="<?php echo ${org_tubepress_api_const_template_Variable::THUMBNAIL_HEIGHT}; ?>" />