Shortly before using jquery and layer to implement a pop-up box, found in the binding popup event, the event executed two times, accurate is the method at the same time registered two times, not in succession performed two times, resulting in pop-up box two times. Consult colleagues, found that the reason may be jquery js and layer of JS conflict (specific reasons need to understand), through the network and ask colleagues, got three kinds of processing methods.
Method One: Add the onclick event directly to the tag without using jquery to bind the event.
Method Two: Use this way $ ("#item_add_button") [0].onclick = function () {method body}. The specific reason for further study.
Method Three: Before binding the event, Add. Unbind ("click") to clear the Click event before binding the Click event $ (". Item_add_button"). Unbind ("click"). Click (function () {method body }
Use the Layer pop-up box to select the appropriate type as needed. Refer to the documentation for details: http://sentsin.com/jquery/layer/
The project uses a different part of the picture (usually in the map) to link the content. The Usemap property of is used. Reference http://www.w3school.com.cn/tags/att_img_usemap.asp
Example: usemap="#planetmap" />
Name= "planetmap" > <area href= "sun.htm" shape= "rect" coords= "0,0,110,260" >Sun</a> <area href= "mercur.htm" shape= "Circle" coords= "129,161,10" >Mercury</a> <area href= "venus.htm" Shape= "Circle" coords= "180,139,14" >Venus</a></map>
Where the Shape property can be polygon, making the shape a polygon. After the coords coords= "X1,y1,x2,y2,x3,y3,...": Each pair of "x, y" coordinates define a vertex of the polygon ("0,0" is the coordinate of the upper-left corner of the image).
Defining a triangle requires at least three sets of coordinates, while high-latitude polygons require a larger number of vertices. Polygons are automatically closed, so you don't need to repeat the first coordinate to close the entire area at the end of the list. Then add the appropriate link in the href.
Executes two times for the jquery binding click event, the layer popup, and the IMG's Map attribute application.