-1

I'm New to Vue. I'm trying to add an HTML template to Vue, this is working fine

<img src="../assets/images/logo.png" alt="" />

But I'm Stuck showing this image "data-image-src="../assets/images/about.jpg""

  <div
    class="parallax_background parallax-window"
    data-parallax="scroll"
    data-image-src="../assets/images/about.jpg"
    data-speed="0.8"
  ></div>

1 Answer 1

0

I think it's not a vue specific issue, do you use some plugin to render the image for the div?

2
  • No . Sorry im new .. what do you mean by plugin ? May 4, 2020 at 5:50
  • I mean, the attribute it's seems used by some plugin like jquery plugin, if you used some kind of that, make sure the vue rendered first before you run the plugin by using $nextTick Here is more detail about nextTick vuejsdevelopers.com/2019/01/22/vue-what-is-next-tick May 4, 2020 at 5:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.