Rephrasing the question, which function executes last in jQuery
plugins? Is that specified?

If not, how can I find out which function is called last? So that I
could call from their a simple alternate(tableID) method.



On Jan 4, 2:50 am, adeveloper <msosn...@gmail.com> wrote:
> I have replaced alternate with an alert statement. The alert statement
> works on document load. However, it is not being called after sorting
> (forgot to mention, the table is being sorted after the user clicks on
> one of the headers). Why is it so?
>
> $(document).ready(function() {
>      $("#tableID").tablesorter({
>         ....
>      });
>     alert('Call to alternate function is here');//shows on document
> load, but not after table is sorted
>  });
>
> On Jan 3, 10:17 am, Mike Alsup <mal...@gmail.com> wrote:
>
> > > I have a table whicIh needs to be sorted.Tablesorterplugin does not
> > > fully work. I am trying to call a simple alternate function from
> > > jQuery $(document).ready method. How to make it work?
>
> > > $(document).ready(function() {
> > >     $("#tableID").tablesorter({
> > >        ....
> > >     });
> > >     alternate('tableID');
>
> > > });
>
> > Assuming that your 'alternate' function is in scope, yes that should
> > work fine.  For example:
>
> > <script type="text/javascript" src="jquery.js">
> > <script type="text/javascript" src="jquery.tablesorter.js">
> > <script type="text/javascript">
> > function alternate(id) {
> >    // custom fn
>
> > }
>
> > $(document).ready(function() {
> >     $('#tableID').tableSorter({ /* options here */ });
> >     alternate('tableID');});
>
> > </script>

Reply via email to