Links for Today’s Scripting Webinar (October 2, 2013)

Recording

The Power of Scripts in MadCap Flare’s HTML5 Output

Key events and key codes

Clear a Flare HTML5 Search Field with the Escape Key

Toolbar Examples Project

Show-hide and effects with jQuery

Show and Hide with jQuery in HTML5 Output

Embellishing the jQuery Slides with Fade Effects

Finding elements and show and hide with JavaScript

Hide Some Flare HTML5 Output Glossary Tab Entries

Show and hide attached to an input

Version Filters in HTML5 Output

Version Filters in HTML5 Output (persisting display instead of toggling)

New Project Example That Handles Inline Elements

Rearranging elements with JavaScript

Sorting TOCs in an Output with JavaScript

Snippet parameterization with AngularJS

Snippet Parameterization for Flare HTML5 Output Using AngularJS

 

5 comments

  1. Hi Thomas!
    I attended your webinar yesterday and you showed a little script hiding the navigation when the search results are displayed. Could you maybe provide this script, since I’m not able to find it here in your post?
    I’d like to take a closer look at this one because it may help me solve some other issue I am adressing right now.

    Thanks in advance!

  2. I implemented the script and it works like a charm, but since you also can start a search by pressing ENTER. I tried to cover this by adapting your script a little bit. But somehow I’m stuck here.

    $(“#search-field”).keydown(function(e) {
    if(e.keyCode === 13) { $(“#show-hide-navigation”).trigger(“click”);}
    });

    This is the only way I could get it to work – and it works basically but it lacks the verification if the class “nav-closed” is already there, which of course results in hiding and showing the navigation everytime I press ENTER in the search field.
    Is there any way to implement your if statement if ($(“#navigation”).attr(“class”) != “nav-closed”) within this script? I couldn’t get this to work with both if statements…

    Maybe I’m missing the point here – but it has been a long day, so I apologize for any “stupid” question you might receive from over here 😉

    1. This works:
      window.onload = function () {
      $(\"#search-field\").keyup(function (e) {
      if ($(\"#navigation\").attr(\"class\") != \"nav-closed\") {
      if (e.keyCode === 13) { $(\"#show-hide-navigation\").trigger(\"click\"); }
      }
      });
      }

Leave a comment

Your email address will not be published.

HTML tags are not allowed.

250,812 Spambots Blocked by Simple Comments