"Not a function" javascript error (jquery floatingbox plugin) -


i wondering why floatingbox plugin not able put div container @ bottom right of page. http://www.phpletter.com/demo/jquery-floating-box-plugin/ today checked site firebug, , found error:

$("#thediv").floating not function

on line: $("#thediv").floating({targetx:"right", targety:"bottom"});

here code:

<script type="text/javascript" src="/js/jquery.js"></script> <script type="text/javascript" src="/js/jquery.floatingbox.js"></script> <script type="text/javascript">     jquery.noconflict();     jquery(document).ready(         function(){             jquery("#thediv").floating({targetx:"right", targety:"bottom"});         }     ); </script> 

the floating function created in plugin:

jquery.fn.floating = function(options) {     return jquery(this).each(          function(i)         {             var nextindex = 0;             for(var index in funcfloating)             {                 nextindex = parseint(index);             }             funcfloating[nextindex + 1] = {};             funcfloating[nextindex + 1].box = this;             funcfloating[nextindex + 1].obj = new floatingbox(this, options, (nextindex + 1));             funcfloating[nextindex + 1].func = function(){ funcfloating[nextindex + 1].obj.dofloat(); };             if (document.layers)             {                 funcfloating[nextindex + 1].obj.init();             }else             {                  funcfloating[nextindex + 1].obj.init();                 funcfloating[nextindex + 1].obj.initsecondary();             }          }     ); }; 

what can fix this? when looking @ source code on plugin's example page, see same code used on own page.

if conflict error of sorts, wouldn't first use of "$" (in "$(document)") trigger error?

well, sure floating() function has been defined on $.fn, jquery object prototype?

  1. make sure you've included floatingbox js file
  2. make sure it's after jquery include $ object exists @ time plugin tries extend prototype.

edit: according code sample, being included in right order. have link can see problem?


Comments

Popular posts from this blog

asp.net - repeatedly call AddImageUrl(url) to assemble pdf document -

java - Android recognize cell phone with keyboard or not? -

iphone - How would you achieve a LED Scrolling effect? -