how to assign php link to jquery?
To achieve my goal as of this question How to apply a url path in after
pseudo element? I want to assign a link to the menu item id.
Within php code I wrote this:
<?php
$app = JFactory::getApplication();
$menu = $app->getMenu();
$item = $menu->getItem(474);
?>
and the jquery code is as you see is :
var $link = $('<a>',{
class: 'all-news-link',
href: $item // here how to assign the link?
});
$('#custom-module .moduletable:nth-child(2) h3').append($link);
No comments:
Post a Comment