...

View Full Version : '$.fn' must be predefined but where?



joecamel
10-07-2010, 08:45 PM
;(function($){
$.fn.superfish = function(op){

var sf = $.fn.superfish,
c = sf.c,
$arrow = $(['<span class="',c.arrowClass,'"> &#187;</span>'].join('')),
over = function(){
var $$ = $(this), menu = getMenu($$);
clearTimeout(menu.sfTimer);
$$.showSuperfishUl().siblings().hideSuperfishUl();
},
Superfish code snippet. Clearly there must be some library some where that defines '$.fn' however I do not know where it is defined nor where to look to learn more about it. Does anyone know more about this?:D

Shaka Zorba
10-07-2010, 09:10 PM
heelo again joe

I just lifted this line from msn.com

<script type="text/javascript" src="http://col.stj.s-msn.com/br/sc/js/jquery/jquery-1.4.2.min.js"></script>

this is how they included an external file
named jquery-1.4.2.min.js

you would do a similar thing to include Superfish
where is the actual file ?
it could be anywhere on the web
(including but not limited to the same server as the HTML)
as lomg as you know the url you can include it like this
<script type="text/javascript" src="here you put the url of the lib you wish to include"></script>

DaveyErwin
10-08-2010, 01:02 PM
;(function($){
$.fn.superfish = function(op){

var sf = $.fn.superfish,
c = sf.c,
$arrow = $(['<span class="',c.arrowClass,'"> </span>'].join('')),
over = function(){
var $$ = $(this), menu = getMenu($$);
clearTimeout(menu.sfTimer);
$$.showSuperfishUl().siblings().hideSuperfishUl();
},
Superfish code snippet. Clearly there must be some library some where that defines '$.fn' however I do not know where it is defined nor where to look to learn more about it. Does anyone know more about this?:D

http://users.tpg.com.au/j_birch/plugins/superfish/#



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum