Uncaught TypeError: Object [object Object] has no method 'overlay'

后端 未结 4 1899
既然无缘
既然无缘 2021-01-16 13:18

Why do I get this error from my overlay jquery code?

This is the code:

jQuery(document).ready(function($) {

    // if the function argument is given         


        
4条回答
  •  -上瘾入骨i
    2021-01-16 13:55

    "Could not find Overlay: nofollow" is caused by using a non-specific css selector to find the links you want to attach your overlay to.

    Including the javascript properly was the correct answer to the initial question... I came to this page based on the Overlay: nofollow issue in a comment.... since this is the first thing I found and didn't find an answer I wanted to comment here since I found it is caused by the css selector finding other uses of .. and there isn't a nofollow overlay...

    assuming 'overlay' is the id of your div as in the following:

    
    
    < !-- the external content is loaded inside this tag -- >

    you should be doing something like:

     $("a[rel=#overlay]").overlay(
    

    instead of:

     $("a[rel]").overlay(
    

提交回复
热议问题