Rebind after ajax is complete


I am currently in the process of working on the app which is through modular pattern.

The problem i am currently getting is that once the Ajax is complete, i want to be able to fire a function within the object. The object i can see but when i specify a function, it fails and comes back as Undefined.


var TestCase = {
  settings: {
    cu: $('.select'),

  init: function() {
    se = this.settings;

  windowsReady: function() {
    if ($.fn.selectBox) {

  ajaxComp: function() {

  selectBind: function(){;


JS Fire - The selectBind works fine when its loaded through the ready call. However as mentioned before, the ajaxcomplete keeps coming back as Undefined for TestCase.ajaxComp(); or a direct call for TestCase.selectBind(); Please note that when i console.log(TestCase) it lists all the objects.

$(document).ready(function () {

$(document).ajaxSuccess(function() {


This is happenning because of this line:

se = this.settings;

The this in the scope of your $(document).ajaxSuccess(...) method will be the jQuery object, not TestCase object.

Try changing it to se = TestCase.settings;

I believe that, alternatively to the suggestions you already recieved, you might want to try the following. Using logicals is probably one of the best options for such a problem, since you don't need to use for-loops:

function out = clear_matr(A)
    % ind is true for all the rows of A, where the highest value is not equal to 1
    ind = ~(max(A, [], 2) == 1);

    % filter A accordingly
    out = A(ind, :);
By : merch

Subtract the julian day integer of the earlier date from the julian integer of the later date. The following tells you exactly how to do that.

Otherwise, already has a C version

long gregorian_calendar_to_jd(int y, int m, int d)
    if(m<3) { y--; m+=12; }
    return (y*365) +(y/4) -(y/100) +(y/400) -1200820

This video can help you solving your question :)
By: admin