Snippet语法Highlighter插件的问题

时间:2011-10-10 14:21:55

标签: php jquery html css jquery-plugins

我觉得这最终会成为一个愚蠢的答案,但我真的看不出有什么问题。

我正在尝试使用JQuery代码段插件:http://www.steamdev.com/snippet/

我在脚注中包含脚本:

<script src="js/jquery.snippet.js"></script>
<script src="js/specific-styles.js"></script>
<script type="text/javascript">
$(document).ready(function(){
    // $("pre.code").snippet("php",{style:"neon"}); // tried this first of all
    $(".code").snippet("php",{style:"neon",clipboard:"js/ZeroClipboard.swf"});
});

和标题中的css:

<link rel="stylesheet" href="css/jquery.snippet.css" type="text/css" />

我的标记如下:

<pre class="code">&lt;?php echo "&copy; 2008 - " . date("Y") ?&gt;</pre>

但是在我的网页上,它看起来就像一种普通的<pre>样式,没有突出显示。

据我所知,我已经做了正确的事情来使用这个插件,所以我只是想知道这里是否有人可以提供帮助。

没有关于Firebug的报道。

1 个答案:

答案 0 :(得分:1)

尝试将jQuery置于“无冲突”模式之后,就在它被包含之后:

<script type="text/javascript">
   var $ = jQuery.noConflict();
</script>