I am trying to hide some
tags with jquery but it doesn\'t seem to work.
I want to hide all options that have the rel
You can't hide or show options. What you must do is clone your select and delete option tags you don't want.
EDIT : something like that http://jsfiddle.net/RnfqW/5/
Check out this code and customize it. I hope it will be useful...
$(function(){
$.fn.extend({
slidingSelect: function(options)
{
var select= $(this);
var selector=select.selector;
var selectedValue="";//=select.val();
var divToggle=$("<div>"+selectedValue+"select Complaint<span style='float:right;'>▼</span></div>").attr({id:select.attr("id")+"Toggle"}).click(function(){
$(selector).slideToggle();
}).insertBefore(select);
select.attr("size",6);
select.change(function(){
divToggle.html(select.val()+"<span style='float:right;'>▼</span>");
$(selector).slideToggle();
});
}
});
$("#complaint").hide().slidingSelect();
});