JMagazine, JQuery plug-in

Source: Internet
Author: User

What is JMagazine?

Nowadays, the Internet is more and more widely used. e-Magazine is a very interesting thing, but most of them are reading it. Basically, they are flash files, which are difficult to modify and slow to load. JMagazine is a plug-in that can help you complete an image and electronic magazine under JQ.

Current version: beta 0.1.3

Compressed filesize: 12,288 bytes

Author: Ariesjia

This is a small example I made. I used jquery ui and the JTooltips I made earlier. In the blog garden, I changed the size of the magazine a little bit, and the demo was attached later.

Operation: 1. Left click to flip the page

2. right-click to zoom in. You can drag the enlarged image with the mouse and scroll the pulley, when you zoom in the image, right-click it and close it (because multiple right-click operations are blocked by my right-click menu)

3. automatic page turning: record the previous operation as "Forward" or "backward" and keep the status

4. the url contains the page value, which is set to the initial page of the magazine and recorded when the link is sent.

<Style>. centerBook {background: # eeeeee; width: 460px; margin-left: 10px; height: 310px; opacity: 0.62; filter: alpha (opacity = 62 );}. magMain {height: 280px; display: block; position: relative; margin: 0 auto; width: 420px ;}. contralBook {background: #777; height: 40px; display: block; position: relative; text-align: center; line-height: 40px; padding-left: 5px; overflow: hidden ;}# ViewMag {width: 500px; height: 312.5px; z-index: 99999999; position: absolute; overflow: hidden; display: none; border: 4px black solid; cursor: move ;}# ViewMag img {width: 500px; height: 625px; cursor: move; clear: both; position: absolute; top: 0px; left: 0px;} # LeftMag, # RightMag {margin-top: 15px; position: relative; width: 210px; float: left; height: 252px; overflow: hidden;} # LeftMag {background: url (' http://images.cnblogs.com/cnblogs_com/ariesjia/leftBook.png ') No-repeat;} # RightMag {background: url (' http://images.cnblogs.com/cnblogs_com/ariesjia/rightBook.png ') Right top no-repeat ;}# LeftMag img, # RightMag img {width: 200px; height: 250px; position: absolute; top: 0px; border-top: 1px #999999 solid; border-bottom: 1px #999999 solid;} # LeftMag img {right: 0px; position: absolute;} # LeftMag span, # RightMag span {position: absolute; width: 15px; height: 250px; overflow: hidden; z-index: 99 ;}# LeftMag span {right: 0px; background: url (' http://images.cnblogs.com/cnblogs_com/ariesjia/left.gif ') No-repeat; filter: Alpha (Opacity = 0, finishOpacity = 50, style = 1, startY = 0, startX = 0, finishY = 0, finishX = 60 );} # RightMag span {left: 0px; background: url (' http://images.cnblogs.com/cnblogs_com/ariesjia/right.gif ') No-repeat; filter: Alpha (Opacity = 90, finishOpacity = 0, style = 1, startY = 0, startX = 0, finishY = 0, finishX = 60 );}. perGirl {z-index: 9999; filter: Alpha (Opacity = 90, Opacity = 100, finishOpacity = 90, style = 2, startY = 0, startX = 0, finishY = 0, finishX = 60); overflow: hidden; display: block; clear: both; background: # FEC7FB; color: #777; line-height: 28px; border: 1px gray solid; padding: 10px; font-weight: bold ;}. perGirl img {height: 28px; width: 28px; float: left; margin-right: 5px ;}. perGirl p {float: left; height: 28px; line-height: 28px ;} </style> <div class = "MainBook clearfix"> <div class = "CenterBook"> <div id = "ViewMag">  </Div> <div class =" MagMain "> <div id =" LeftMag "> </div> <div id =" RightMag "> </div>/ div> <div class = "ContralBook"> <a id = "L_bttn">  </A> <a id =" R_bttn ">  </A> <a id =" Auto_bttn "<a>  </A> <a id =" StopAuto_bttn ">  </A> <a id =" Copy_bttn ">  </A> </div> <br/> <center> for more tutorials, visit: <a href = http://www.bkjia.com/ Target = _ blank _ fcksavedurl =" http://www.bkjia.com/ Target = _ blank "> http://www.bkjia.com/ </A> </center>

Tip: the code can be modified before running!

Interface Introduction

Reference content is as follows:
JMag ()
MagJson: JMagazine configuration file [Obj] LeftPage: Left page of the magazine [Selector]
RightPage: the right page of the magazine [Selector]
ViewPage: enlarge the magazine page [Selector]
Recommended: magazine recommendation information [Selector]
StarPageNum: magazine start book [Int]
PageCount: Total number of pages in a magazine [Int]
PageWidth: magazine width [Int, String]
PageHeight: magazine height [Int, String]
DefaultPageSpeed: Default paging animation speed [Int]
BeforeLoad: action before loading [Function]
AfterLoad: action after loading [Function]
PageEvent: Custom flip animation [Function]
PageFirst: the first page of the action [Function]
PageLast: the action of turning to the first page [Function]
PageError: page turning error [Function] PageError has a lower priority than PageFirst and PageLast. If PageLast or PageFirst is executed, PageError is not executed.

StopAuto () stops turning pages automatically
Zoom () to enlarge the ViewPage image, defaultvalue: 2
AutoPlay () starts turning pages automatically
If PageGo () is a page flip, a data ('style', 'pagego ') is cached. If PageGo is a page flip, a data ('style', 'pagego') is cached. data ('style', 'pageback'); then execute PageGo ()
GetPageIMG (): Get the picture on the left and right pages of a magazine. src: getPageIMG (). left: getPageIMG (). right
GetPageNum () gets the current number of pages in a magazine and starts counting from 0.
GetTotalNum () Get the total number of pages of a magazine
GetMagConfig () Get the magazine configuration file
JumpTo () jumps to N pages, where N is the left page of the magazine

There are so many, I will continue to update. Since it is an electronic magazine of html, I will add the function of configuring HTML code on each page in the next beta version.

  

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.