---
title: "Jquery elements always block"  
description: "Jquery elements always block"  
author: "Anonymous User"  
published: 2014-10-30  
updated: 2014-10-30  
canonical: https://www.mindstick.com/forum/2471/jquery-elements-always-block  
category: "jquery"  
tags: ["javascript", "html", "facebook api", "css"]  
reading_time: 2 minutes  

---

# Jquery elements always block

Hi Guys\
I have created [Safari](https://www.mindstick.com/forum/453/font-weight-bold-property-not-support-in-ie-opera-safari-chrome) [Extension](https://www.mindstick.com/articles/22/extension-method) that blocks certain [elements](https://www.mindstick.com/forum/1440/wpf-button-with-multiple-text-elements) from [Facebook](https://www.mindstick.com/articles/44467/successful-companies-that-utilize-facebook-as-a-social-media-platform) and I was wondering is it possible to make it [block](https://www.mindstick.com/forum/157599/explain-the-process-control-block-pcb-in-the-operating-system) all the time. For example, it blocks the elements when you [load](https://answers.mindstick.com/qa/33737/what-is-meant-by-average-load-time) Facebook, however when you [click](https://www.mindstick.com/articles/12423/social-login-magento-2-one-click-to-register-social) the Facebook logo in the top [left](https://www.mindstick.com/articles/12768/don-t-be-left-behind-with-the-new-it-revolution) corner all the elements come back, you have to manually [reload](https://www.mindstick.com/forum/224/title-reload-assembly-to-extend-with-new-types) the [page](https://www.mindstick.com/articles/13031/why-to-make-a-wikipedia-page) to block them again. So basically all the elements come back when you click something that doesn't reload the page.Please help me\
**Here is my code.****\**\

```
jQuery(document).ready(function () {      $("#content").find("#sideNav").find("#listsNav").css("display", "none");});
```

## Replies

### Reply by Anonymous User

It all depends on what facebook actually does when you click the logo.

If it makes an AJAX request, then you can listen for that event and re-hide the elements then.

## For example:

```
$(document).ajaxComplete(function () {    $("#content").find("#sideNav").find("#listsNav").css("display", "none");});
```

If it just runs some local javascript then you could listen for the click event, and again run your code. For example, assuming the logo has an id of #logo\

```
$("#logo").click(function () {    $("#content").find("#sideNav").find("#listsNav").css("display", "none");});
```

In addition, as suggested by Satpal, ids are meant to be unique to a page so you don't need to find them the hard way, just reference them directly like so:\

```
$("#listsNav").hide();
```


---

Original Source: https://www.mindstick.com/forum/2471/jquery-elements-always-block

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
