Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New Coder
    Join Date
    Oct 2010
    Posts
    10
    Thanks
    3
    Thanked 0 Times in 0 Posts

    '$.fn' must be predefined but where?

    ;(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?

  • #2
    New Coder
    Join Date
    Sep 2010
    Location
    U S of A
    Posts
    67
    Thanks
    0
    Thanked 13 Times in 13 Posts
    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>

  • #3
    Regular Coder
    Join Date
    Aug 2010
    Posts
    974
    Thanks
    19
    Thanked 212 Times in 210 Posts
    Quote Originally Posted by joecamel View Post
    ;(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?
    http://users.tpg.com.au/j_birch/plugins/superfish/#


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •