Jmagazine, JQ 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.

 

 

Interface Introduction
Jmag ()
Magjson: jmagazine magazine configuration file[OBJ]<A JSON object has a format, which I will describe later>
Leftpage: Left of the magazine[Selector]
Rightpage: the right page of a magazine[Selector]
Viewpage: Enlarged 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 action of turning to the first page[Function]
Pagelast: the action of turning to the first page[Function]
Pageerror: page turning error action[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 HTML e-Magazine, I will add the HTML code configuration function for each page in the next beta version.

Plug-in download: http://files.cnblogs.com/ariesjia/JMagazine.js

 

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.