Git Product home page Git Product logo

query-dom-components's People

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

query-dom-components's Issues

conflict with jQuery

Hey Dorian,

I came across an issue today using query-dom-components and having jQuery defined in window;
I'm using the regular JavaScript NodeList afterwards, so passing a jQuery object returns an error.

I did a really quick patch as you can see in my fork, but it makes hasJquery to false by default if it's not previously specified in options.

I guess this is not the idea behind it so we could do the opposite:

var wantJquery = opts.jQuery || true;
var hasJquery = wantJquery && typeof jQuery !== 'undefined';

So we'll need to do this to prevent jQuery being used (even if it's loaded):

var DOM = query({ el: this.el, jQuery: false });

Let me know what you think!

multiple 'js-' classes on a single el

Hello, it's is me again :)

So, I have this use case; I'd like to apply a css prop on all .js-el elements and after that, apply a tween on all .js-stagger elements.

<div class="js-el js-stagger"></div>
<div class="js-el js-stagger"></div>
<div class="js-stagger"></div>

Currently, you cannot have multiple js- classes on a single element.

The expected object would therefore be:

var object = {
   el: NodeList[2],
   stagger: NodeList[3]
};

Let me know what you think!

targetElements is an empty NodeList

Hey Dorian,

I can't make query-dom-components work for some reasons. I tried to console.log targetElements under index.js and it returns an empty NodeList (see screenshot).

var targetElements = container.querySelectorAll('*[class*="' + prefix + '"]');
console.log(container);
console.log(targetElements);

capture d ecran 2015-07-22 a 12 31 52

The last console.log is the queryDom object:

var DOM = queryDom({el: document.getElementById('page-home')});

Using this HTML structure:

capture d ecran 2015-07-22 a 12 22 35

Do you have any ideas of what I'm doing wrong?
Merci! :)

[SVG] element.className.split is not a function

Yo!

J'essaye d'utiliser query-dom-components sur un SVG, et j'ai cette erreur:

Uncaught TypeError: element.className.split is not a function (ligne 22)

As-tu une idée de ce qui pourrait produire ca?

Thanks!

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.