function ajax_links_api_test in Ajaxify Drupal with JQuery Ajax 7
Same name and namespace in other branches
- 6 ajax_links_api.module \ajax_links_api_test()
Callback - ajax-links-api/test.
1 string reference to 'ajax_links_api_test'
- ajax_links_api_menu in ./
ajax_links_api.module - Implements hook_menu().
File
- ./
ajax_links_api.module, line 268 - Make any links or create new links to load content to particular DIV via jQuery Ajax.
Code
function ajax_links_api_test() {
global $base_url;
$link1 = '<a href="' . $base_url . '/user" class="test" rel=".test1">User</a>';
$link2 = l_ajax('load this test page', 'ajax-links-api/test', '#content');
$link3 = '<a href="' . $base_url . '/user" class="ajax-link" rel=".test2">User</a>';
$ouptut = '<h2>Method 1 : load Profile </h2>(link with class="test" and rel=".test1". You can ajaxify this link by adding this link
class .test in admin settings):<br />' . $link1 . '<div class="test1"></div>';
$ouptut .= '<h2>Method 2 : load this test page </h2>(using l_ajax):<br />' . $link2 . '';
$ouptut .= '<h2>Method 3 : Load profile </h2>(link with class="ajax-link" and rel=".test2"):<br />' . $link3 . '<div class="test2"></div>';
return $ouptut;
}