How to use Jquery hovercard in Socialengine 4 Framework?

好久不见. 提交于 2019-12-14 03:26:45

问题


I am trying to use Jquery Hovercard in Socialengine framework

I am using jquery plugin: http://designwithpc.com/Plugins/Hovercard#demo

everything works fine in my local system. but I don't know how to use the same in the socialengine framework.

can anyone help me where I can keep js file I have two js file?

  1. jquery.min.js
  2. hovercard.js

How to include and use it in Activity module exact location is bellow,

activity\views\scripts_activityText.tpl

You can also see the page here: http://demo-se.spur-i-t.com/ . I want to use under term What's new when hovering over profile image.


回答1:


First off, jQuery and Social Engine don't always play nice. SocialEngine comes with Mootools, so using it will make your life a bit easier. That said, you can add reference to your JS files into: application\modules\Core\layouts\scripts\default.tpl.

Then you will find that you have namespace conflicts between jQuery and Mootools. To resolve this you will need to change the namespace of all resulting jQuery by adding the following line at the head of the same file.

var $j = jQuery.noConflict();



回答2:


I've done this like this

<script src="<?php echo $baseURL; ?>js/jquery.js"></script>
<script type="text/javascript">

var $j = jQuery.noConflict();

$j(document).ready(function() {
  alert();
});

</script>


来源:https://stackoverflow.com/questions/10931344/how-to-use-jquery-hovercard-in-socialengine-4-framework

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!