skip to Main Content

I made a simmple example at fidle.
https://jsfiddle.net/johi123/0xdvq3wp/10/

from my project:
Always say me there is no id set.
url:
https://hiti-seo.com/seo-suchmaschinen-optimierung/news/seo-news.html#MUM – Eine neue Ära der Suche beginnt

console message:
Uncaught TypeError: $(…).offset() is undefined

I don’t know why it"s say Problem is at $(”)offset, the problem is the second headline id ="#MUM – Eine neue Ära der Suche beginnt" who i set.

2

Answers


  1. Chosen as BEST ANSWER

    Its the empty space in the id , that was the Problem .

    Anyway thank you for try to help.


  2. I think you should give the name of the attribute:

    var wichid=$('li:eq(0)').attr();

    =>

    var wichid=$('li:eq(0)').attr("id");

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search