In this article will see how to create an AdRotator using jQuery without using the AdRotator ASP.NET control.
Add the jQuery file and reference in your page, as in:
Create some static "LI" elements as shown below. We can dynamically create these elements from the DB also. Notice that the "Div" id needs to referred to in jQuery.
Add the jQuery scripts to load the AdRotator.
In the script, first the variable for the active "LI" element needs to be initialized and we set to "0". Using "nth-child()" jQuery selector we can select specific child elements and check the following link for more details about the selector:
Run the solution and check the output.
Creating an AdRotator using jQuery is simple as well as powerful.