html - creating a link to a div -


is possible create link div? line of code:

     output +='<h2><a href=\"link-to-a-website" >' + val.product + '</h2>'; 

i have created rich internet application , need link div within website

yes possible need use id instead of class.

example:

<h2><a href="#targetdiv" >' + val.product + '</a></h2>  <div id="topdiv"> </div> <div id="targetdiv"> </div> 

jsfiddle: https://jsfiddle.net/andrewl32/45o6u4le/2/


the target div on different page/site have specify path correctly.


Comments

Popular posts from this blog

php - Passing multiple values in a url using checkbox -

compilation - PHP install fails on Ubuntu 14 (make: *** [sapi/cli/php] Error 1) PHP 5.6.20 -

sql - Postgresql tables exists, but getting "relation does not exist" when querying -