jPlayer + custom Views ajax

Error message

  • Deprecated function: Methods with the same name as their class will not be constructors in a future version of PHP; GeSHi has a deprecated constructor in require_once() (line 818 of /home/xenyomed/public_html/sites/all/modules/libraries/libraries.module).
  • Deprecated function: Methods with the same name as their class will not be constructors in a future version of PHP; ctools_context has a deprecated constructor in require_once() (line 127 of /home/xenyomed/public_html/sites/all/modules/ctools/ctools.module).
  • Deprecated function: Methods with the same name as their class will not be constructors in a future version of PHP; ctools_context_required has a deprecated constructor in require_once() (line 127 of /home/xenyomed/public_html/sites/all/modules/ctools/ctools.module).
  • Deprecated function: Methods with the same name as their class will not be constructors in a future version of PHP; ctools_context_optional has a deprecated constructor in require_once() (line 127 of /home/xenyomed/public_html/sites/all/modules/ctools/ctools.module).
  • Deprecated function: The each() function is deprecated. This message will be suppressed on further calls in _menu_load_objects() (line 579 of /home/xenyomed/public_html/includes/menu.inc).

WE HAVE MOVED!

Please visit our new Drupal Website at https://www.xenyo.com.

$=jQuery;
$(document).ready(function(){
  var selector = $("#block-views-jplaylist-block a");
  selector.click(function (event){
    event.preventDefault();
 $.ajax({
      url: "/views/ajax",
      type: "POST",
      dataType:"json",
      data: {
        "js":0,
        "view_name":"ontopjplayer",
        "view_display_id":"block",
        "view_args": $(this).attr('rel')
      },
      success: function(view) {
        $(".view-ontopjplayer").replaceWith(view[1].data);
           Drupal.settings.jPlayer = view[0].settings.jPlayer;
           Drupal.settings.jplayerInstances = view[0].settings.jplayerInstances;
           Drupal.attachBehaviors(document);
    }
    });
  });
}); 
Help Share this Article