dannyrosalex
dannyrosalex

Reputation: 1834

Jquery-Object expected

Can somebody tell me why Jquery is erroring out at this point?

  <script type="text/javascript" language="javascript">
        var myLayout; 
       // a var is required because this page utilizes: 
       // myLayout.allowOverflow() method
        $(document).ready(function() {
            myLayout = $('body').layout({
            // enable showOverflow on west-pane 
            // so popups will overlap north pane
            // west__showOverflowOnHover: true
           });
       });
  </script>

Upvotes: 0

Views: 2673

Answers (3)

dannyrosalex
dannyrosalex

Reputation: 1834

Just figured out the problem.

I overlooked the placement of my site.

I placed it in c:\Projects\MySites\JohnsonCo.sln

Notice that is not in the wwwroot directory! That is, **c:\Inetpub\wwwroot**

I'm guessing IIS was not configured correctly and that's why no sort of directory specification was working in the script src attribute().

I thought I would never answer my own question but I think I just did. Thanks for the input, for those of you who responded!

Thanks, Berlioz

Upvotes: 1

ichiban
ichiban

Reputation: 6210

Unless you have your own custom plug-in extension. $('body').layout() is not a valid jQuery function.

EDIT: I'm assuming that you are using this plug-in. Make sure the inclusion of the <script> tag for the plug-in comes after the inclusion of jQuery and not the other way around. This is most likely the source of the error.

Example:

<script type="text/javascript" src="jquery.min.js"></script>
<script type="text/javascript" src="jquery.layout.min.js"></script>

Upvotes: 1

Thomas
Thomas

Reputation: 5009

My guess would be because layout is not a function of body or of the jQuery object...however it doesn't particularly help unless you actually give us an error.

Upvotes: 0

Related Questions