Giter Site home page Giter Site logo

Can't use as a module about halkabox.js HOT 4 CLOSED

fabioconti avatar fabioconti commented on September 27, 2024
Can't use as a module

from halkabox.js.

Comments (4)

ahmednooor avatar ahmednooor commented on September 27, 2024

@fabioconti thanks for your input. can you please check the files in the zip and confirm that the halkaBox is being exported? thanks.

node index.js

module-exports.zip

from halkabox.js.

fabioconti avatar fabioconti commented on September 27, 2024

@ahmednooor it prints stuff, but doesn't seem to init galleries :(

from halkabox.js.

fabioconti avatar fabioconti commented on September 27, 2024

the problem seems to be here:

// collecting all the anchor tags having data-hb attribute with their respective values
imageLinks = document.getElementsByClassName(selector),

I used data-hb selector and not class, but data-hb attribute is ignored in the code :)
I'm goin to correct this in my html output, but I suppose it's better to use the data-hb attribute, at least I think it's a cleaner solution.

Anyway I think you can uglify the file you sent me and put it in dist.

from halkabox.js.

ahmednooor avatar ahmednooor commented on September 27, 2024

@fabioconti thanks for your input. actually i changed data-hb to class for backwards compatibility and ease of use. most new comers to html usually only know about a handful of attributes such as id and class (personal experience). besides class is almost used on every element so why introduce more weight to the html while we can get the work done without it.

i have added the feature in the new release (link below). closing this issue now. feel free to report any future bugs/issues.

module.exports added.
1.2.0

from halkabox.js.

Related Issues (19)

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.