views:

220

answers:

2

Why is it when i am looking at tutorials, or examples, when i just essentially do a cut and past onto my HTML page, i get the "Object doesnt support this property or method" on my page, but the site that i copied the script from does not give this error?

is my jQuery library old?

not sure what to do...

here is what i am working on...it is a multiple overlay page.

<map name="Map" id="Map">
  <area shape="poly" coords="90,63,128,110,150,95,177,80" href="#" class="bmhoverlay"  rel="#mies1"/>
  <Area shape="poly" coords="255,5,257,64,276,68,301,73" href="#" class="bhmoverlay"  rel="#mies2" />
</map>

Here is the CSS:

/* the overlayed element */ 
.simple_overlay {
  /* must be initially hidden */     
  display:none;
  /* place overlay on top of other elements */
  z-index:10000;
  /* styling */
  background-color:#333;
  width:675px;
  min-height:200px;
  border:1px solid #666;
  /* CSS3 styling for latest browsers */
  -moz-box-shadow:0 0 90px 5px #000;
  -webkit-box-shadow: 0 0 90px #000;
}
/* close button positioned on upper right corner */
.simple_overlay .close {
  background-image:url(../img/overlay/close.png);
  position:absolute;
  right:-15px;
  top:-15px;
  cursor:pointer;
  height:35px;
  width:35px;
}

/* styling for elements inside overlay */
.details {
  position:absolute;
  top:15px;
  right:15px;
  font-size:11px;
  color:#fff;
  width:150px;
}
.details h3 {
  color:#aba;
  font-size:15px;
  margin:0 0 -10px 0;
}

And calling the script to the page:

<script>
$("area[rel]").overlay();
</script>

but every time i generate this page, i get the "object doesnt support this property or method"..???

anyone? i am using jquery library 1.3.2

+3  A: 

jQuery doesn't have a .overlay() function. Are you sure you have included the same plug-ins that the site you're basing it off of does?

here's one such overlay plugin:

jQuery Tools Overlay

Austin Fitzpatrick
Thats the same site i am using the script from. I thought i was calling the plugin correctly in my <head></head> tag: <script src="/js/jquery-1.3.2.min.js"></script> <script src="http://cdn.jquerytools.org/1.1.2/jquery.tools.min.js"></script> is that not the proper way?
tony noriega
Ok, just tested again, and it works in FF but not in IE8... but keep in mind, when i visit the jQuery Tools Overlay site with IE8, it works fine. i am confused.
tony noriega
Problem Solved. I had to essentially put the .js plugin file on my server. IE8 was creating a https error, and when i would click "yes" it would throw the error.
tony noriega
+2  A: 

jQuery doesn't include an overlay() function by default. You'll need a plugin for that, like one of the ones here.

kevingessner