Question: How do i get jQuery to load once I click on the button. So far it loads when the page is loading. I want it to load after clicking the button! i tried a lot of things and they haven't worked so far please help...

this my code so far for it

```
<a href="#image_link" title="PutLockerMedia" id="click">watch</a>
<div style="display:none">
  <div id="image_link">
    <div class="imageWrapper">
      <div class="image"> 
    <iframe src="http://www.putlocker.com/embed/E25FA20CE8643E5F" width="600" height="360" frameborder="0" scrolling="no"></iframe>
      </div>
    </div>
  </div>
</div>

<script type="text/javascript">
   $(document).ready(function(){
      $("#click").fancybox({'scrolling': 'no','titleShow': false,'onClosed':
         function(){$("#login_error").hide();}});
   });
</script>

```

Answer: 
In this precise case, you could use

```
if 'div' in di['resp'][u'frame']['html']:

```

More generally, if you don't know (or care) where `'div'` is within `di`, you will need a function to search through the various sub-dictionaries.
You must do a deep search for it.

```
def rec_search(d):
    for key in d.keys():
        if key == 'div': return True
    for value in d.values():
        if isinstance(value, dict) and rec_search(value): return True
    return False

```