Ajax-Include-Pattern
Ajax-Include-Pattern copied to clipboard
added onOrientationChange / onManualCall options and test page
this "fixes" (improves at least) #6 as explained in readme:
onOrientationChange: when set to false it avoids Ajax call when a media query does not evaluate to true onload but later onOrientationChange. This can save bandwith and also avoid confusion when user has passed scrolling area of elements containing ajaxInclude triggers.
onManualCall: to allow downloading content in previous situations or simply when a media query is not met (ie. smaller displays), we can do so manually on click. Script detects links inside ajaxInclude elements and prevents further action since we want to get content via ajax if possible.
sorry @scottjehl for sending 4 commits, had'nt run grunt and couldnt find the error travis was blocking. i hope you do like the PR anyway
sorry mate, I can't stop it! :)
You are welcome
It doesn't matter how many commits are contained in a PR. You can rebase it again into one commit, when everything is finished
@staabm hell i should go learn some Git now… :) rebase sounds pretty scary to me :S
See e.g. http://gitready.com/advanced/2009/02/10/squashing-commits-with-rebase.html
cool, thanx again! but wont i mess it up if i rebase commits already pushed and even commented here?
The whole git history of this branch will be rewritten, so you should wait until everything is finished.
@staabm @scottjehl Hi, I had forgotten about this PR. Would you be interested in merging this? do you need any further background info, etc? I've used my fork in several projects now and I think the 2 additions are nice. Of course that's just my opinion :)