Changeset 647655
- Timestamp:
- 01/04/2013 12:19:24 AM (13 years ago)
- Location:
- easy-faq-with-expanding-text
- Files:
-
- 15 added
- 3 edited
-
tags/3.1.5 (added)
-
tags/3.1.5/arrows.png (added)
-
tags/3.1.5/downarrow.png (added)
-
tags/3.1.5/faq.php (added)
-
tags/3.1.5/faq_checkbox.png (added)
-
tags/3.1.5/faq_heading.png (added)
-
tags/3.1.5/faq_title.png (added)
-
tags/3.1.5/faqmaker.js (added)
-
tags/3.1.5/faqstyle.css (added)
-
tags/3.1.5/minussign.png (added)
-
tags/3.1.5/none.png (added)
-
tags/3.1.5/plusminus.png (added)
-
tags/3.1.5/plussign.png (added)
-
tags/3.1.5/readme.txt (added)
-
tags/3.1.5/uparrow.png (added)
-
trunk/faq.php (modified) (1 diff)
-
trunk/faqmaker.js (modified) (1 diff)
-
trunk/readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
easy-faq-with-expanding-text/trunk/faq.php
r640889 r647655 3 3 Plugin Name: Easy FAQ with Expanding Text 4 4 Description: Easily create a Frequently Asked Questions page with answers that slide down when the questions are clicked. No need for a shortcode, HTML coding, or javascript tweaking. 5 Version: 3.1 5 Version: 3.1.5 6 6 Author: bgentry 7 7 Author URI: http://bryangentry.us -
easy-faq-with-expanding-text/trunk/faqmaker.js
r640915 r647655 1 1 function bgfaq(foldup) { 2 jQuery('.bg_faq_content_section :header:not(h6)').each(function(){ 3 //containsimg = jQuery(this).getElementsByTagName('img'); 4 //if ( !containsimg ) 5 jQuery(this).addClass('bg_faq_closed'); 6 jQuery(this).nextUntil(':header').css({'display':'none'}); 7 var textsize = jQuery(this).css('font-size'); 2 jQuery('.bg_faq_content_section :header:not(h6)').each(function(){ // select all the heading in .bg_faq_content_section other than h6 3 jQuery(this).addClass('bg_faq_closed'); //make these heading "closed" 4 jQuery(this).nextUntil(':header').css({'display':'none'}); //hide everything up until the next heading 5 var textsize = jQuery(this).css('font-size'); //get the font size in order to more accurately position the visual cue 8 6 var halftextsize = parseInt(textsize)/2; 9 7 var backgroundpos = Math.round(halftextsize)-10; 10 var padding = jQuery(this).css('padding-top'); 8 var padding = jQuery(this).css('padding-top'); //get the padding in order to help us position the visual cue 11 9 var padding = parseInt(padding); 12 10 var backgroundpos = Math.round(halftextsize)-10+padding; 13 jQuery(this).css({'background-position-y': backgroundpos}); 14 console.log(textsize);11 jQuery(this).css({'background-position-y': backgroundpos}); //position the visual cue 12 15 13 jQuery(this).click(function(){ 16 17 if(jQuery(this).hasClass('bg_faq_opened')) { 18 jQuery(this).nextUntil(':header').slideUp(); 14 //whenever one of these headings is clicked, 15 if(jQuery(this).hasClass('bg_faq_opened')) { //check to see if it's opened. If so,... 16 jQuery(this).nextUntil(':header').slideUp(); //slide up the content beneath it and mark this heading "closed" 19 17 jQuery(this).removeClass('bg_faq_opened').addClass('bg_faq_closed'); 20 } 21 else { 22 if(foldup=='yes') { 23 jQuery('.bg_faq_opened').each(function(){ 24 jQuery(this).nextUntil(':header').slideUp(); 18 } 19 else { //if it isn't opened, 20 if(foldup=='yes') { //check to see we are supposed to fold up other content so only one answer shows at a time. 21 jQuery('.bg_faq_opened').each(function(){ //if so... 22 jQuery(this).nextUntil(':header').slideUp(); //foldup other content and mark the headings as closed 25 23 jQuery(this).removeClass('bg_faq_opened').addClass('bg_faq_closed'); 26 24 }) 27 25 } 28 jQuery(this).nextUntil(':header').slideDown(); 26 jQuery(this).nextUntil(':header').slideDown(); //then roll out the content and mark the heading as opened 29 27 jQuery(this).removeClass('bg_faq_closed').addClass('bg_faq_opened'); 30 28 } -
easy-faq-with-expanding-text/trunk/readme.txt
r640889 r647655 4 4 Tags: faq pages 5 5 Tested up to: 3.5 6 Stable tag: 3.1 6 Stable tag: 3.1.5 7 7 License: GPLv2 8 8 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 23 23 24 24 == Changelog == 25 26 = 3.1.5 = 27 Improved compability with Internet Explorer by removing a line of javascript that was not needed. 25 28 26 29 = 3.1 =
Note: See TracChangeset
for help on using the changeset viewer.