Comments (4)
Yep you can provide a html element so you could do something like
loop(marquee, [
() => {
const $a = document.createElement(‘a’);
$a.setAttribute(‘href’, ‘<url>’);
$a.textContent = ‘<text>’;
return $a;
}
]);
from dynamic-marquee.
Cool! Instead of textContent
I've used innerHTML
and it works great.
(Would be nice to have support for jQuery elements, so we dont have to write plain js :D)
Thanks!
from dynamic-marquee.
Great! Just be careful with innerHTML
that you’re doing any necessary escaping/encoding, especially if you’re getting the contents from somewhere else
from dynamic-marquee.
If you have a jquery element I think you could just use .get()
to get the element reference and pass that.
from dynamic-marquee.
Related Issues (20)
- Word Wrap? HOT 6
- No room for item. HOT 2
- StartVisible Marquee HOT 7
- clear() is broken HOT 2
- How to start crawl from perticular position? HOT 6
- More than one Spacing issue between the text HOT 6
- Character Overlapping HOT 2
- How to add fetch support from json? HOT 1
- In Angular (above 2 version) getting error 'Cannot find name 'dynamicMarquee' HOT 10
- Is there any callback events available? HOT 6
- Marquee wont work in Angular after giving build HOT 8
- Support stop on mouseover? HOT 2
- Javascript error on safari with loop function HOT 3
- Infinite loop when using images in upDown mode HOT 11
- [Question] Stop on touch? (loop?) HOT 1
- Why this is not working. HOT 6
- Left to Right HOT 3
- Action required: Greenkeeper could not be activated 🚨
- Marquee is a little jerky HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dynamic-marquee.