Javascript图像滑块上一个和下一个按钮

时间:2017-09-06 20:55:17

标签: javascript html css

您好我正在制作带有基本javascript的图像滑块,但我无法使用上一个和下一个按钮。滑块是自动的,每3秒滑动一次。当我单击我的下一个按钮时,滑块时间会发生变化,或者它的工作方式与预期不同。我无法弄清楚自己的错误。请帮忙,下面是代码 -

HTML

$post_types

CSS代码

Select * from 
(
SELECT TOP 720
        ind_first_name AS [First Name],
        ind_last_name AS [Last Name],
        cst_recno AS [Member ID],
        cst_eml_address_dn AS [Email Address],
        adr_city AS City,
        adr_state AS [State],
        adr_country AS Country,
        cst_org_name_dn AS Company,
        cst_ixo_title_dn AS [Job Title],
        CASE
            WHEN mem_member_product LIKE '%Stud%' 
              THEN 'Associate Student'
            ELSE 'Exclude'
        END AS [Member Type]
FROM co_individual 
INNER JOIN co_individual_ext  ON ind_cst_key_ext = ind_cst_key 
INNER JOIN co_customer ON cst_key = ind_cst_key 
    AND ind_delete_flag=0
    AND ind_deceased_flag=0 
LEFT JOIN co_customer_x_address ON cst_cxa_key = cxa_key 
LEFT JOIN co_address ON adr_key = cxa_adr_key 
LEFT JOIN vw_client_uli_member_type ON cst_key = mem_cst_key 
WHERE mem_member_type IS NOT NULL and mem_expire_date >= '9/7/2017' and mem_member_product LIKE '%Stud%'
AND adr_country = N'UNITED STATES' 
AND ind_deceased_flag != 1 
AND ind_key_leader_flag_ext != 1 
AND ind_int_code != N'Staff' 
AND ind_int_code != N'Spouse' 
AND ind_int_code != N'Press'
order by newid()

UNION

SELECT TOP 80
        ind_first_name AS [First Name],
        ind_last_name AS [Last Name],
        cst_recno AS [Member ID],
        cst_eml_address_dn AS [Email Address],
        adr_city AS City,
        adr_state AS [State],
        adr_country AS Country,
        cst_org_name_dn AS Company,
        cst_ixo_title_dn AS [Job Title],
        CASE
            WHEN Mem_member_type in ('Full Under 35 Sustaining','Full Member') and ind_age_cp <= '35'
              THEN 'Full Member Under 35'
            ELSE 'Exclude'
        END AS [Member Type]
FROM co_individual 
INNER JOIN co_individual_ext  ON ind_cst_key_ext = ind_cst_key 
INNER JOIN co_customer ON cst_key = ind_cst_key 
    AND ind_delete_flag=0
    AND ind_deceased_flag=0 
LEFT JOIN co_customer_x_address ON cst_cxa_key = cxa_key 
LEFT JOIN co_address ON adr_key = cxa_adr_key 
LEFT JOIN vw_client_uli_member_type ON cst_key = mem_cst_key 
WHERE mem_member_type IS NOT NULL and mem_expire_date >= 9/7/2017 and mem_member_type in ('Full Under 35 Sustaining','Full Member') and ind_age_cp <= '35'
AND adr_country = N'UNITED STATES' 
AND ind_deceased_flag != 1 
AND ind_key_leader_flag_ext != 1 
AND ind_int_code != N'Staff' 
AND ind_int_code != N'Spouse' 
AND ind_int_code != N'Press'
    order by newid ()
) as Unioned_Query

Javascript代码

<!DOCTYPE html>
<html>
<head>
<title>Image Slider</title>
<link rel="stylesheet" type="text/css" href="css/style.css">
</head>
<body>
<!-- the main body of the slider -->
<div class="main-container">
    <ul id="slider">
      <li>
        <img src="images/img1.jpg">
      </li>

      <li>
        <img src="images/img2.jpg">
      </li>

      <li>
        <img src="images/img3.jpg">
      </li>
    </ul>
    <a class="arrow prev">&#10094;</a>
      <a class="arrow next" onclick="next(1)">&#10095;</a>
</div>

0 个答案:

没有答案