Skip to content

Make easy use a different selector #17

@Kikobeats

Description

@Kikobeats

I like the library, but I don't like how to select the container of the image.

In the documentation you write a markup like:

<div colorify-main-color>
    <img colorify src="image1.jpg">
    <img colorify src="image2.jpg">
    <img colorify src="image3.jpg">
  </div>

but in the real worlds we use class and ids!

<div id="main-container" class"style-border">
    <img id="avatar" src="image1.jpg">
  </div>

This throw an error:

Uncaught DOMException: Failed to execute 'querySelectorAll' on 'Document': '[.profile]' is not a valid selector.

IMO, a better solution is pass to querySelectorAll the container selector.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions