djax icon indicating copy to clipboard operation
djax copied to clipboard

Changes

Open darksmo opened this issue 11 years ago • 4 comments

Hello, I've been using djax for a project and made a bunch of changes.

See commit messages for details.

I was wondering if you would like to pull and merge the changes in the main repository.

Changes are basically:

  • ajaxLoaded is an additional event triggered when all the items have been replaced
  • added one more rule for replacing blocks of markup (see 58f03a0)
  • all click events are namespaced
  • cross-browser title replacement (wasn't working on IE7)
  • public navigate method to trigger navigation programmatically
  • more standard jquery plugin interface (see 53871aa)

Cheers, Savio

darksmo avatar Jul 07 '13 09:07 darksmo

@darksmo all sounds great and thanks for opening- this will take me some time to evaluate since the diff is so large.

One note from initial readthrough- the syntax is incorrect in your updated readme examples (missing curly brackets around parameter object)

Other than that I'll aim to give a line by line readthrough within the next week and I'll add any comments to specific commits as necessary, or merge if everything looks good.

Thanks again for all this, very cool pull request.

beezee avatar Jul 07 '13 13:07 beezee

Cool, have fixed the syntax in the documentation...

darksmo avatar Jul 07 '13 13:07 darksmo

Recently I came across your fork of djax and tried it on a project. I was wondering if the script is working properly since I got multiple errors due to e.g. the following code:

$('a:not(.' + settings.ignoreClass + ')',…

But even by changing the code to get rid of the errors the script doesn’t insert anything from the ajax call. Maybe you can help me to get the script working as desired.

WTVader avatar Jun 24 '14 21:06 WTVader

Hello @WTVader, please ignore that fork.

After this commit it really diverges from the original project (DJAX). I should perhaps delete it or point it in the README to avoid further confusion around.

The one I'm currently using is DDJAX (see https://github.com/lokku/jquery-ddjax). It shares the same idea as DJAX, but the implementation of block replacements is left to you (e.g., for better performance).

darksmo avatar Jun 24 '14 22:06 darksmo