Title: Callback with php and javascript
Last modified: August 21, 2016

---

# Callback with php and javascript

 *  [Tsybin](https://wordpress.org/support/users/tsybin/)
 * (@tsybin)
 * [12 years, 5 months ago](https://wordpress.org/support/topic/callback-with-php-and-javascript/)
 * Hi! How can add callback multi function with php and javascript? Example:
 *     ```
       <script type="text/javascript">
       $(document).ready(function(){
       	var stream = {
       		title: "<?php the_title(); ?>",
       mp3: "<?php
            $my_meta = get_post_custom_values( 'mp3', $ID );
            if ( $my_meta) {
                foreach ( $my_meta as $val_key => $val_val ) echo $val_val;
            }
       ?>",
       ready = false;
       	$("#player_<?php the_ID(); ?>").Player({
       Player: "#player_<?php the_ID(); ?>",
       		ready: function (event) {
       			ready = true;
       		},
       	});
       });
       </script>
       ```
   
 * [http://wordpress.org/plugins/infinite-scroll/](http://wordpress.org/plugins/infinite-scroll/)

The topic ‘Callback with php and javascript’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/infinite-scroll.svg)
 * [Infinite-Scroll](https://wordpress.org/plugins/infinite-scroll/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/infinite-scroll/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/infinite-scroll/)
 * [Active Topics](https://wordpress.org/support/plugin/infinite-scroll/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/infinite-scroll/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/infinite-scroll/reviews/)

 * 0 replies
 * 1 participant
 * Last reply from: [Tsybin](https://wordpress.org/support/users/tsybin/)
 * Last activity: [12 years, 5 months ago](https://wordpress.org/support/topic/callback-with-php-and-javascript/)
 * Status: not resolved