Smarty Variable Regulator case

Source: Internet
Author: User

Requirements:

For example, there is the content of each row, when the mouse is put up to show the gray area, when the mouse leaves the gray area disappears

Description

Loop implementation of the line display, the loop body is a div, inside put two Div, with JS to achieve the effect, get to the element, one up each row in the gray area set hidden, add the event $ (". XS"). MouseOver ( function() {$ (this). Children ("div"). CSS ("display"," block");}) ;

Code:

Background

<? PHP include (".. /init.inc.php "); include (".. /dbda.php "); $attr Array ("Zibo Han Enterprise High-quality member enterprises and practical training completion of the project Exchange conference hope that all the trainees prepare for the two sides to submit a satisfactory answer", "answered whether the Austrian accounting law in Anhui played a frame oh on time to reply to the Unit OU I go to pay the Money method good card issuing call fee AH send Cafe Autumn", " Answer whether the Austrian accounting law in Anhui played a good time to reply to the Unit OU I go to pay the way the card issuing call fee AH send Cafe autumn Wind "); $smarty->assign ("Shuzu",$attr); $smarty->display ("test1.html");

Front Desk display:

<Head><Metahttp-equiv= "Content-type"content= "text/html; charset=utf-8" /><Scriptsrc=".. /.. /config/jquery-1.11.2.min.js "></Script><title>Untitled Document</title><Scripttype= "Text/javascript">$ (document). Ready (function(e) {$ (". XS"). MouseOver (function(){                $( This). Children ("Div"). CSS ("Display","Block"); })            $(". XS"). Mouseout (function(){        $( This). Children ("Div"). CSS ("Display","None"); })});</Script></Head><Body><{foreach$shuzu as $v}><Divclass= ' xs 'style= ' width:500px;height:30px '>    <span><{$v|substr:30: "..."}></span>    <Divstyle= ' width:300px;height:100px; margin:0px 0px 0px 300px; Background-color: #CCC; Display:none '><{$v}></Div></Div><{/foreach}></Body></HTML>

Smarty Variable Regulator case

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.