I wanted to use double-click dictionary search on my forum, so I added these lines to the headerinclude template.
<script language="javascript" src="http://dictionary.cambridge.org/external/scripts/dblclick.js" type="text/javascript">
$(function() {setupDoubleClick('http://lookup-dictionary.cambridge.org/license/sample/', 'british', false, null, null, 'cup_lookup');});</script>
<script language="JavaScript" type="text/javascript" src="http://code.jquery.com/jquery-1.8.3.min.js"></script>
However, it seems to have a conflict with the Forum Christmas Light mod that I'm using. When the dictionary works, the lights disappear. Please help me solve this problem!
<script language="JavaScript" type="text/javascript" src="http://code.jquery.com/jquery-1.8.3.min.js"></script>
<script language="javascript" src="http://dictionary.cambridge.org/external/scripts/dblclick.js" type="text/javascript">
$(function() {setupDoubleClick('http://lookup-dictionary.cambridge.org/license/sample/', 'british', false, null, null, 'cup_lookup');});</script>
copy this code and paste in headerinclude
Thank you, Jack! I tried but it didn't work.
Change above to this;
<script language="javascript" src="http://dictionary.cambridge.org/external/scripts/dblclick.js" type="text/javascript"></script>
<script type="text/javascript">
$.noConflict();
$(function(){
setupDoubleClick('http://lookup-dictionary.cambridge.org/license/sample/', 'british', false, null, null, 'cup_lookup');
});
</script>
<script language="JavaScript" type="text/javascript" src="http://code.jquery.com/jquery-1.8.3.min.js"></script>
Thanks Yaldaram! But the Christmas lights still disappeared...
Can you please post your website's URL and any testing login account credentials?
You need to declare a unique variable, this should work:
<script language="javascript" src="http://dictionary.cambridge.org/external/scripts/dblclick.js" type="text/javascript">
var stp = jQuery.noConflict();
stp(function() {
setupDoubleClick('http://lookup-dictionary.cambridge.org/license/sample/', 'british', false, null, null, 'cup_lookup');});
</script>
<script language="JavaScript" type="text/javascript" src="http://code.jquery.com/jquery-1.8.3.min.js"></script>
Thanks Frank, it didn't work out. Now forget the lights since I've just disabled it. However, when I put the scripts in the "showthread" template, I can double click to look up for definitions but I can no longer Quick Edit any posts. I believe it's still a jquery conflict. Please help me out!
Here's my site:
http://englishbird.org/forum
And here is a testing account:
Username: TestUser
Password: test123