You should put the $(document).ready function above the function call.

so:

$(function(){  //Same as $(document).ready(function)
 function del(mesId){
 }
});

On Mon, Apr 27, 2009 at 11:48 AM, Ozan <ozanaltink...@gmail.com> wrote:

>
> Hi I'm a newbie and heres my newbie question.I can't fire my function
> with onclick event in Firefox.My little piece of code works perfect in
> IE. but in firefox it just doesn't work and no error in firebug by the
> way.I'm using Firefox 3.0.9
>
> This is the code:
>
> <script type="text/javascript">
>        function del(mesId) {
>            $(document).ready(function() {
>                $("#" + mesId).hide("fast");
>
>            });
>        }
>
>    </script>
>
>
> and the html;
>
> <button id="delete" onclick="del(<%# Eval("Id")%>)">Delete</button>
>
> What am I doing wrong? And thank you for your answers.
>

Reply via email to