Javascript Slideshow does not work

0

I have a problem, I imported a site in .asp and the slide show on the home page is not appearing, I already found the files and they are imported correctly, the whole site works less this function.

using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;

namespace WebSite
{
    public partial class WebSite : System.Web.UI.MasterPage
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                string strJavaScript = "";

                strJavaScript = "<script type='text/javascript'>";
                strJavaScript = strJavaScript + " function start() {";
                strJavaScript = strJavaScript + " var markup = @<div style='z-index=0' class='pics'>";

                ArrayList numbers = RandomNumbers(1, 13, 10);

                for (int i = 0; i < numbers.Count; i++)
                {
                    strJavaScript = strJavaScript + "<img src='App_Themes/BackGround/forma_maquetes-" + numbers[i] + ".jpg'>";
                }

                strJavaScript = strJavaScript + "</div>@;";
                strJavaScript = strJavaScript + " $('.pics').remove();";
                strJavaScript = strJavaScript + " $(markup).insertAfter('#ctl00_effect').cycle({";
                strJavaScript = strJavaScript + " fx: 'fade',";
                strJavaScript = strJavaScript + " timeout: 3000,";
                strJavaScript = strJavaScript + " delay:  -1000,";
                strJavaScript = strJavaScript + " sync: true";
                strJavaScript = strJavaScript + " });";
                strJavaScript = strJavaScript + " }";
                strJavaScript = strJavaScript + " </script>";
                strJavaScript = strJavaScript.Replace(Convert.ToChar(39), Convert.ToChar(34)).Replace(Convert.ToChar(64), Convert.ToChar(39));

                litScript.Text = strJavaScript;

                Random rndSlogan = new Random();
                int idSlogan = rndSlogan.Next(1, 6);

                switch (idSlogan)
                {
                    case 1:
                        lblSlogan.Text = "A dimensão da sua idéia.";
                        break;
                    case 2:
                        lblSlogan.Text = "A forma exata da imaginação.";
                        break;
                    case 3:
                        lblSlogan.Text = "Um detalhe para seu projeto.";
                        break;
                    case 4:
                        lblSlogan.Text = "Em sintonia com seu empreendimento.";
                        break;
                    case 5:
                        lblSlogan.Text = "Gente que Transforma.";
                        break;
                }

                imgLogotipo.ImageUrl = "~/Handler/GetLogotipo.ashx";
            }
        }

        static ArrayList RandomNumbers(int begin, int end, int quantity)
        {
            // cria um objeto da classe Random
            Random rnd = new Random();
            // vamos preencher um ArrayList com a faixa de números
            ArrayList values = new ArrayList();
            for(int i = begin; i < end; i++)
            {
                values.Add(i);
            }
            // Vamos embaralhar o ArrayList
            for(int i = 0; i < values.Count; i++)
            {
                int aux = rnd.Next(values.Count);
                object temp = values[i];
                values[i] = values[aux];
                values[aux] = temp;
            }
            // Retorna o array e números obtidos
            return values.GetRange(0, quantity);
        }
    }
}

The site is formamaquetes.com.br and when I inspect the element I find the files but I do not find any problem

<script type="text/javascript"> function start() { var markup = '<div style="z-index=0" class="pics">
<img src="App_Themes/BackGround/forma_maquetes-2.jpg">
<img src="App_Themes/BackGround/forma_maquetes-10.jpg">
<img src="App_Themes/BackGround/forma_maquetes-5.jpg">
<img src="App_Themes/BackGround/forma_maquetes-9.jpg">
<img src="App_Themes/BackGround/forma_maquetes-4.jpg">
<img src="App_Themes/BackGround/forma_maquetes-7.jpg">
<img src="App_Themes/BackGround/forma_maquetes-6.jpg">
<img src="App_Themes/BackGround/forma_maquetes-8.jpg">
<img src="App_Themes/BackGround/forma_maquetes-3.jpg">
<img src="App_Themes/BackGround/forma_maquetes-12.jpg">
</div>'; $("div.pics").remove(); $(markup).insertAfter("#ctl00_effect").cycle({ fx: "fade", timeout: 3000, delay:  -1000, sync: true }); } 
</script>
    
asked by anonymous 02.02.2018 / 15:27

0 answers