Giter Site home page Giter Site logo

Comments (1)

bramstein avatar bramstein commented on August 14, 2024

Hi,

Looks good! I'd be happy to make the changes, could you do a pull
request? I'll need to add a README with a contributors section now :)

On Thu, Jun 2, 2011 at 9:30 PM, cawinkelmann
[email protected]
wrote:

The jquery.jlayout.js file needs to be updated to use html5 data- attributes which is built into jquery 1.4.3 +. That way the metadata plugin can be removed. Below I highlight the change that I believe needs to be made. I have included a version that still checks for the metadata plugin just in case you want to keep the check around for people that are still using it.

jquery.jlayout.js

current:

o = $.metadata && element.metadata().layout ? $.extend(opts, element.metadata().layout) : opts,

html5 data- attribute only:

o = element.data('layout') ? $.extend(opts, element.data('layout')) : opts,

backwards compatibility:

o = element.data('layout') ? $.extend(opts, element.data('layout')) : ( $.metadata && element.metadata().layout ) ? $.extend(opts, element.metadata().layout) : opts,

Little tip as far as jquery and data- attributes are concerned:

The attribute has single quotes around js objects instead of double quotes

   

--
Reply to this email directly or view it on GitHub:
#1

from jlayout.

Related Issues (10)

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.