-5
When running the html validator (https://validator.w3.org) on my website it shows the following error (Attribute slider-bg not allowed on element article at this point):
full slider programming here:
https://github.com/devfreelex/sliderdevmean
How to add data-slider-bg and . data(slider-bg) for no error in Validator W3?
Speak there, edu! Please [Dit] your question and add more information about your problem. As for example the mistake.
– LipESprY
When I run an html checker (https://validator.w3.org) it shows the error about (slider-bg). Because the correct one would be to add between the <article></article> img src="" but then the problem in the image (size).
– edu
Can someone help me?
– edu
It turns out that the validator has identified an invalid attribute in the article tag. But, in reality, it does not influence your code. Slider reads this attribute like this:
var sliderBg = $(this).attr('slider-bg');
. If you still feel bothered by this error, you will need to review the slider. This can be easily solved by setting it as data-slider-bg and the slider would read with the . data('slider-bg') method. If something is not working, surely you are looking for error in the wrong place.– LipESprY
Anyone can help?
– edu
Dude, I already gave you the knife and the cheese. What’s missing for you to "get your hands dirty"? Show some effort. I know you can do it! Or only if it’s code ready?
– LipESprY
Take this, ó: https://github.com/devfreelex/sliderdevmean/pull/1/commits/ffcd9705bd06e7f9beb6885dd4dd9ecdf942f592
– LipESprY