Question: This is code to perform the delete operation. The four images appear, but the alert box for delete operation is not appearing by giving the onload functionality. Please guide me...here is the code.

```
// script for deletedelete operation  

    $(document).ready(function(){

        $('a.delete').on('click',function(e){
            e.preventDefault();
            imageID = $(this).closest('.image')[0].id;
            alert('Now deleting "'+imageID+'"');
            $(this).closest('.image')
                .fadeTo(300,0,function(){
                    $(this)
                        .animate({width:0},200,function(){
                            $(this)
                                .remove();
                        });
                });
        });

    });

```

HTML

```
//four images being given with delete link

 <div id="container">
        <div class="image" id="image1" style="background-image:url(http://lorempixel.com/100/100/abstract);">
            <a href="#" class="delete">Delete</a>
        </div>
        <div class="image" id="image2" style="background-image:url(http://lorempixel.com/100/100/food);">
            <a href="#" class="delete">Delete</a>
        </div>
        <div class="image" id="image3" style="background-image:url(http://lorempixel.com/100/100/people);">
            <a href="#" class="delete">Delete</a>
        </div>
        <div class="image" id="image4" style="background-image:url(http://lorempixel.com/100/100/technics);">
            <a href="#" class="delete">Delete</a>
        </div>
    </div>

```

Answer: 
I'd use a function like this one, where `range` is the string you gave

```
function highlightDivs(range) {
     var lower = range.split(" ")[0].slice(1);
     var upper = range.split(" ")[2].slice(1);

     $('.section-link').hide();
     $('.section-link').children('.price').each(function() {            
        if (lower <= $(this).val() && upper >= $(this).val()){
             $(this).parent().show();
         }
    });
}

```
Use jQuery's filter()

An example -> <http://jsfiddle.net/H6mtY/1/>

```
var minValue = 0.01,
    maxValue = 100.01;

var filterFn = function(i){
    var $this = $(this);

    if($this.hasClass('amount')){

        //    assume that text is always a symbol with a number
        var value = +$this.text().match(/\d+.?\d*/)[0];

        if(value > minValue && value < maxValue){
            return true;
        }
    }
    return false;
};

//    apply your filter to body for example
$('#target span')
.filter(filterFn)
.each(function(i,ele){

    // do something with the selected ones
    $(this).css('color','red');
});

```