jquery resize div
<p>I am writing a little function to resize my search div to stay the same width as the dynamic table below. Why does it work if I don't use a function, and then fails if i do use the function. I would like to use a function for this as I have multiple gridview/searchs.</p>

<p>Javascript Code</p>

<pre><code> $(document).ready(function() {
                   function ResizeSearch(GridID, SearchID) {                              
                          alert("\"" + GridID + "\"" + ' ' + "\"" + SearchID + "\"");
                          var eleWidth = $("\"" + GridID + "\"").width();
                           $("\"" + SearchID + "\"").width(eleWidth);
                       };
                       $("#getp").click(function() {
                       ResizeSearch("$(#&lt;%= gvValidStatus.ClientID %&gt;)", "$(#ValidStatusSearch)");
                       /* 
                       ****** Why does this work, but when passing to function it does not? ******
                       var eleWidth = $("#&lt;%= gvValidStatus.ClientID %&gt;").width();
                       $("#ValidStatusSearch").width(eleWidth);
                       */
                       });
                   });
</code></pre>

<p>Output from Alert</p>

<pre><code>---------------------------
Windows Internet Explorer
---------------------------
"$(#ctl00_Content_gvValidStatus)" "$(#ValidStatusSearch)"
---------------------------
OK   
---------------------------
</code></pre>
