Query Panel (searchbar) that can be scaled in the dwz (Jui) Tutorial)

Source: Internet
Author: User

Query Panel (searchbar) that can be scaled in the dwz (Jui) Tutorial)

This kind of requirement has been raised recently. A page has many query conditions, which occupy a large amount of space if all are displayed at a time. Therefore, it is divided into two categories: simple search and advanced search, when you click Advanced search, all entries are displayed.

In this way, there is a problem. The height of the pageheader panelbar on and off the page (navtab, DIALOG) is determined by the layouth value. If the panel is higher, the following paging labels will be supported,

The solution is to retrieve the front and back height differences when the searchpanel height is changed. Modify the layouth value of the current page element and layout again.

$ ("Document "). ready (function () {$ ("# gjjs "). click (function () {$ this = $ (this); var YH = $ ("# workplan_search "). height (); if ($ this. text () = 'advanced search') {$ this. text ('simple search')} else {$ this. text ('advanced search')} $ ("# workplan_search. complex "). toggle (); var XH =$ ("# workplan_search "). height (); var $ Panel = $ this. parents ('. unitbox: First '). find ("[layouth]"). each (function () {$ (this ). ATTR ("layouth", parseint ($ (this ). ATTR ("layouth") + (XH-Yh); $ (this ). layouth () ;}); return false ;});});

The above is before and after the change, and I hope it will help you.

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.