Giter Site home page Giter Site logo

Comments (3)

vick08 avatar vick08 commented on June 2, 2024

Have a look at the example where we proposed to run load the plugin lazily.

On Nov 7, 2014, at 9:39 AM, mdgbayly [email protected] wrote:

I'm probably missing something really dumb here, but I don't understand the correct way to load this plugin.

The default instructions say just add to your scripts section after bootstrap.
However the plugin contains lots of DOM manipulation code like:

$('.alert').attr('role', 'alert')

This runs before our dom is ready so none of these DOM manipulations get applied.

What am I not understanding?

Thanks
Martin


Reply to this email directly or view it on GitHub #66.

from bootstrap-accessibility-plugin.

mdgbayly avatar mdgbayly commented on June 2, 2024

Ok, yep, I saw that. But that seems inconsistent with the other instructions that say you can just include bootstrap-accessibility after you include bootstrap. It seems a little unorthodox to require applications to have to implement special lazy loading schemes to correctly use this plugin. Why not include all the DOM manipulation code in some kind of init method that applications could call from their existing jQuery dom ready handlers?

And sorry - this isn't a complaint! Thanks for sharing your code - this type of accessibility functionality is much needed in a shared library. If you think this is an appropriate solution maybe we'll have a go and coding something and sharing back.

from bootstrap-accessibility-plugin.

OwenEdwards avatar OwenEdwards commented on June 2, 2024

Just to clarify, although Lazy-loading is an option, if this plugin is not Lazy-loaded, it must be inserted at the end of the <body> of the document, not in the <head>; the features do not work if the script is included in the <head>. The section in the README.md does not make this clear.

I'm surprised that all the initialization in this plugin isn't wrapped in a $(function(){...}), so it gets run on document ready; am I missing something?

from bootstrap-accessibility-plugin.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.