Quantcast
Channel: Visual Studio and Visual Web Developer Express
Viewing all articles
Browse latest Browse all 3509

how to write asp code to click link that is visible only when hover over an item

$
0
0

I am trying to use ASP to automate clicking on a list, e.g. "first child", that is only visible when the mouse hover over it. Example of the HTML code is:

<ul id='table' class="table">
    <li>1</li>
    <li>2</li>
</ul>

<script type="text/javascript">
$(function() {
$('.table li').hover(function() {$(this).append("<ul id='testlist'> <li><a href='#'> first child</a> </li> <li><a href='#'> second child</a> </li>")}, 
  function() {$('#testlist').remove()} 

But a code like:

    Set namelist = IE.document.getelementsbyname("testlist")

will return "empty" as "testlist" is only visible when mouseover.

How to force the mouseover event so that the list, 'testlist', becomes available?


Viewing all articles
Browse latest Browse all 3509

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>