Jump to content

php function doesnt work with jquery class


abrahamgarcia27

Recommended Posts

i have this function that is running a jquery class running in the image, but i can't make the effect run.

   <td width="130" ><img src="${thumbnailUrl}"  height="150px" width="150px" title="${videoTitle}" class="imgOpa" />

 

i placed another image like this and this work so i dont know if there is a problem running a class inside a function.

 <img src="images/01.png" class="imgOpa" />

 


/**
* Echo the list of videos in the specified feed.
*
* @param  Zend_Gdata_YouTube_VideoFeed $feed The video feed
* @return void
*/
function echoVideoList($feed)
{  



  echo "<h2 style='text-align:left;font-family:Tahoma, Geneva, sans-serif; color:#999;'>Search Results</h2>";
     echo '<table class="videoList">';
    echo '<tbody width="100%">';
$i = 1;
   foreach ($feed as $entry) {
        $videoId = $entry->getVideoId();
        $thumbnailUrl = $entry->mediaGroup->thumbnail[0]->url;
        $videoTitle = $entry->mediaGroup->title;
        $videoDescription = $entry->mediaGroup->description;
       print <<<END
        <tr onclick="ytvbp.presentVideo('${videoId}')">
        <td width="130" ><img src="${thumbnailUrl}"  height="150px" width="150px" title="${videoTitle}" class="imgOpa" />

  		</td>
     
        </tr>
END;
	if( $i % 5 === 0 && $entry !== end($feed) ) {
        echo "</table>\n<table class='videoList2'>\n";
           } elseif ( $entry === end($feed) ) {
          echo "</table>\n";
		  }
   $i++;
}  






}

i just looked at it my main html source doesn't show the videos, probably because they are running through AJAX

 

it shows this

<div id="searchResults">

    <div id="searchResultsListColumn">

        <div id="searchResultsVideoList">

            </div>

        
  </div>

        <div id="searchResultsVideoColumn">

      <div id="videoPlayer"></div>

    </div> 


</div>


 

but when i inspect the elements it does show this

 

<img src="http://i.ytimg.com/vi/YY7LOQK6giw/0.jpg" height="150px" width="150px" title="Natalie Calvert, Calcom Group: Experimentation" class="imgOpa">

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.