How to add data-slider-bg and . data(slider-bg) not to give error in Validator W3?

Asked

Viewed 108 times

-5

  • Speak there, edu! Please [Dit] your question and add more information about your problem. As for example the mistake.

  • 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).

  • Can someone help me?

  • 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.

  • Anyone can help?

  • 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?

  • Take this, ó: https://github.com/devfreelex/sliderdevmean/pull/1/commits/ffcd9705bd06e7f9beb6885dd4dd9ecdf942f592

Show 2 more comments

1 answer

-1


  • Why the negative?

  • I don’t think it’s gonna solve the colleague’s problem. I think he wants it ready, because I commented exactly that right there in his question and yet he keeps asking for help.

  • If you want, you can use mine pull request as a reference for your answer: https://github.com/devfreelex/sliderdevmean/pull/1/commits/ffcd9705bd06e7f9beb6885dd4dd9ecdf942f592

  • 1

    Anyway, the purpose of the site is not to create pull-requests or give the code ready as he asks in this context.

  • I understand perfectly. So much so that I did not risk to answer the question. I preferred to point out a possible solution via comment. Even so, it is noticeable that the AP did not make an effort to do it itself. Nor did it post its own code to fix it. If my goal was to deliver ready to the AP, I would have formulated a response and "referenced my pull request". Although I did not do exclusively to AP, but rather to the author of the slider. I found it interesting and it is "doubly useful" to cooperate correcting "part of the code".

  • in localhost works but on the site (in domain) is not showing the images...

  • 1

    As I had commented: "If something is not working, surely you are looking for error in the wrong place". You cannot drop a question here without defining EXPLICITLY what your goal is, without passing your code, presenting the error returned, what you expect, what’s happening, and so on. How about rephrasing your question?

  • It is that before the slider worked perfectly, but the w3c Validator accused that error. Now w3c shows no error but the slider images do not appear... But thanks for the help.

Show 3 more comments

Browser other questions tagged

You are not signed in. Login or sign up in order to post.