Comments (2)
Absolutely. When content is included via ajaxInclude, the plugin triggers an ajaxInclude
event on the element that received the new markup. Something like this should work:
$( ".myselector" ).on( "ajaxInclude", function(){
$(this).find('.flexslider').flexslider({ animation: "fade", directionNav: false, controlNav: false });
});
Fixes #8.
On Sep 26, 2012, at 1:34 PM, davebeesley1983 wrote:
If I am right, your fix to this should help me out.
I am new to this "Ajax Include pattern" system - having been directed this way by Ethan Marcotte after asking the question on twitter "Using 'display:none' in Responsive seems to be frowned upon, am I doing it wrong"I decided to test/learn how to use this on a site that uses a content slider - namely flexslider - to display content. But It is pulling in the replacement markup and assets to create the slider fine (albeit in tags, which I suppose is normal and may be overidden) but the slider in it's normal for is triggered by a JQuery statement - $('.flexslider').flexslider({ animation: "fade", directionNav: false, controlNav: false });
Is there a way to cause this to fire when the markup is replaced, a callback perhaps?
—
Reply to this email directly or view it on GitHub.
from ajax-include-pattern.
Closing per @scottjehl’s comment.
from ajax-include-pattern.
Related Issues (20)
- allow modification of ajax response before it is appended to DOM
- option to include content only upon a certain action, such as a tap/click HOT 2
- Ajax Include with Respond HOT 1
- Possible to handle media queries with a class or id and not attributes inline?
- "ajaxInclude" event fires before the DOM has been updated when using data-replace HOT 1
- The data-interaction feature does not work with some non-jQuery libraries that share a jQuery API HOT 2
- Demo not working HOT 1
- Travis-CI failing HOT 1
- JQuery Free Version? HOT 1
- Loading Page Fragments HOT 2
- What about SEO? HOT 1
- HierarchyRequestError: Node cannot be inserted at the specified point in the hierarchy HOT 1
- Medium severity vulnerability affecting this repo
- URL to filamentgroup site is wrong
- Omit proxy argument, Bad Things Happen™ HOT 2
- data-scroll option HOT 1
- Allow data-media attribute to work after resize / @media changes HOT 1
- Remove ajaxInclude data- attributes after include is handled
- write some unit tests
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ajax-include-pattern.