Sticky Content not working!


Topic: Sticky Content not working!

Muhammad Faishal pro asked 6 years ago

I'm trying to use MDB Sticky Content for my first project with MDB, but i got an error with this Sticky Content Feature and the element is still static.

MDB Version: MDB Pro 4.5.14

 

File with error: jquery-3.3.1.min.js

 

Error Messages:

jQuery.Deferred exception: t(...).offset(...) is undefined; can't access its "top" property

 

More Details:

jQuery.Deferred exception: t(...).offset(...) is undefined; can't access its "top" property value@http://localhost/tridee/assets/js/mdb.min.js:1:350442 i@http://localhost/tridee/assets/js/mdb.min.js:1:349897 t.fn.sticky/<@http://localhost/tridee/assets/js/mdb.min.js:1:352249 each@http://localhost/tridee/assets/js/jquery-3.3.1.min.js:2:2571 each@http://localhost/tridee/assets/js/jquery-3.3.1.min.js:2:1238 t.fn.sticky@http://localhost/tridee/assets/js/mdb.min.js:1:352228 @http://localhost/tridee/dashboard:83:22 l@http://localhost/tridee/assets/js/jquery-3.3.1.min.js:2:29373 a/</c<@http://localhost/tridee/assets/js/jquery-3.3.1.min.js:2:29677 undefined jquery-3.3.1.min.js:2:30920

 

Help me please...


Bartłomiej Malanowski staff pro premium commented 6 years ago

How can we reproduce your issue?


Mawendel pro commented 6 years ago

I have the same error. It worked for me a couple of versions ago. I'm not sure if it broke in this version or if it was in another recent version.

Code i use is straight out of the examples (and as i said it used to work with no error):

$('.sticky').sticky({
topSpacing: 38,
zIndex: 2
});

 

<div class="sticky">

...

</div>


Bartłomiej Malanowski staff pro premium commented 6 years ago

You need to add "stopper" element


Mawendel pro commented 6 years ago

Hmm, it works. But this must be something new, since it didnt require this previously to work.

In any case, i wish the 'sticky-stopper' was more clear. I thought it was something it would do on its own.

"Note: If no stopper id or class is provided, by default script uses 'sticky-stopper'. You can also use number values for pixel points on the y-axis."


Bartłomiej Malanowski staff pro premium commented 6 years ago

It's a bug that will be fixed in the nearest future 


alvintng pro answered 6 years ago

My content disappears upon scrolling down!! So I can't see anything. When I remove the 'top' css class in the chrome dev console then it appears again.


Bartłomiej Malanowski staff pro premium commented 6 years ago

Thank you for reporting this to us. We're already working on fix for your issue


Pytchoun answered 6 years ago

this functino is buged a lot


Bartłomiej Malanowski staff pro premium commented 6 years ago

The issue is still on our TODO list


vivek-saurabh pro answered 6 years ago

Does this issue is solved or still pending


Bartłomiej Malanowski staff pro premium commented 6 years ago

This is still in our TODO list


Paul Kim (Little Tiger) pro priority vip early access premium commented 6 years ago

being more than 7 months still TODO list, nice....


Bartłomiej Malanowski staff pro premium commented 6 years ago

The issue is still on the TODO list. If you want to help us to get this fixed faster, you can make us a PR (If you have access to the jq-pro repository)


Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Answered

Specification of the issue
  • User: Pro
  • Premium support: No
  • Technology: MDB jQuery
  • MDB Version: 4.5.10
  • Device: DELL Laptop
  • Browser: Firefox Developer Edition
  • OS: Linux Ubuntu
  • Provided sample code: No
  • Provided link: Yes