Question: I have a function here that finds the sibling(answerfields) of the parent(li) then counts the child inputs.

```
$('#addAnswer').live('click', function(){
    var selected = $(this).parents('li').siblings('#answerFields').children('input').length;
    document.getElementById('legend').innerHTML = selected;
});

```

How can i shorten this up using Jquery 1.5.2?

I have a working [JSFiddle](http://jsfiddle.net/rayd360/bPp8a/).

Answer: 
Other way could be using `perl`:

```
perl -i -pe '
  BEGIN { 
    $keysalts = qx(curl -sS https://api.wordpress.org/secret-key/1.1/salt) 
  } 
  s/{AUTH-KEYS-SALTS}/$keysalts/g
' wp-config.php

```
Actually, I like this [one better](https://stackoverflow.com/questions/584894/sed-scripting-environment-variable-substitution)

```
sed -i 's/{AUTH-KEYS-SALTS}/'"$keysalts"'/g' wp-config.php

```

Personal choice. :-)