Question: I have spent a couple of days surfing the internet to find an answer to my question. I have tried everything I could but have been unsuccessful thus far in solving this problem. Netbeans keeps giving **Waiting for Connection (netbeans-xdebug)**.

I am using the following software:

* XAMPP Version 1.8.1.
* Windows 7
* Netbeans IDE 7.2.1
* Xdebug 2.2.1

I installed the latest version according via the wizard for the xdebug.org site (http://xdebug.org/wizard.php). Xdebug is working according to phpinfo().The HMTL output in my browser (Firefox 17.0.1) shows xdebug code. However this is not communicated back to netbeans. Using Netstat via command prompt (Run -> cmd.exe) shows that there is a TCP connection on port 9000. However , nothing is reported back in Netbeans. 

I have tried several different alternatives, for example:

* Installing a similar IDE, Eclipse PDT. Eclipse shows that Xdebug is  

working. However, because Eclipse is lacking functions I need I  

wanted to use Netbeans.
* Installing Netbeans on Ubuntu 12.04 LTS.  

Still the same problem. Netbeans not working (waiting for  

connection). Also output in browsers shows that Xdebug is working.

Answer: 
Try this using ternary operator:

```
.after(insertAfter ? $('<div />') : '')

```
A couple of jQuery methods allow passing a function `func`. Often not clearly documented, but returning `undefined` from `func` is like a no-op, even in setters like `.attr('src', func)`.

(In this setter example, `func` should return whatever you want `'src'` set to otherwise.)