# $(document).ready(function() doesn't work after link

**URL:** <https://forum.kirupa.com/t/document-ready-function-doesnt-work-after-link/320664>\
**Category:** web dev\
**Created:** [March 29, 2011, 5:38pm UTC](https://forum.kirupa.com/t/document-ready-function-doesnt-work-after-link/320664 "2011-03-29T17:38:44Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![breravin](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/breravin/32/410_2.png) [@breravin](https://forum.kirupa.com/u/breravin)\
**Post date:** [March 29, 2011, 5:38pm UTC](https://forum.kirupa.com/t/document-ready-function-doesnt-work-after-link/320664/1 "2011-03-29T17:38:44Z")

</div>

Hi Guys,

I’m at my wit’s ends trying to figure this out. I’m just too new at this.

I’ve noticed that any scripts I run after $(document).ready(function() do not work after certain links.

On my site, if you use the “older posts” link, you’ll notice that the images do not have the rollover/fade effect. My fancybox script does not work either. _However_ if I use the Gallery or Archive links, everything works fine.

Something about that “older posts” link breaks things. Blogspot uses a “widget” to activate those links. The code for that looks like this:

```auto
 <b:if cond='data:olderPageUrl'>
      <span id='blog-pager-older-link'>
      <a class='blog-pager-older-link' expr:href='data:olderPageUrl' expr:id='data:widget.instanceId + &quot;_blog-pager-older-link&quot;' expr:title='data:olderPageTitle'><data:olderPageTitle/> &#8594;</a>
      </span>
    </b:if>

```

This seems like such a simple problem, but I just don’t know what to do. If you can help I’d really appreciate it.
