Edited: Jul 27, 2018
you can do that by getting the text value of the element (and set it as the link format) then setting the link to it, after that you can redirect the user using wixLocation.to() method.
let link= $w('#text1').text
let pageLink ='http://'+link+'.com' // "http://wix.com"
Thank your suggestion Massa i appreciate. I will try this code on my website, i'll inform you about the result.
Hey Massa, please tell me that i have to write these two line only or else will i have to add "import data from wix". Please help because I'm from a non-technical background i have almost no experience in coding. I am trying to build a website for my start-up.
- to use wixLocation.to() you have to import wixLocation:
import wixLocation from 'wix-location';
you can read more about wixLocation here: https://www.wix.com/code/reference/wix-location.html#to
- you have to add those lines to the event that should link to that page (on page ready / on click / on mouse in / ....)
Okay...thankx alot Massa
Very very great full to you.big time.
Your code worked. Thankyou so very much.
Hey Massa, how are you?
I need your help once again. I am attaching 3 photo in those photo u will see boxes with "x" and "✓" mark. I want to know how can hide those boxes with "x" when my respective drynamic page is visible. I have attached the picture of my database too. Please need i need your assistance. I have text you on Facebook messenger.
you can see this example of how to hide and show elements: https://www.wix.com/code/home/example/Hide-and-Show-Elements
if you have any questions you can post them on the forum for our wixCode team to help you.