Search Results

Search found 2 results on 1 pages for 'th3hamburgler'.

Page 1/1 | 1 

  • jQuery Validation Plugin: Invoke errorPlacement function when onfocusout, keyup and click

    - by th3hamburgler
    Hi, I am using the jquery validation plugin and want to use the errorPlacement function to add error messages to the fields title attribute and display just a ? next to the field. This works great when the form is submitted with the submit button but when any of the following events are triggered: - onfocusout - click - onkeyup The validation checks are run but it skips the errorPlacement function and adds the full error message after the field, like the default behaviour. I am using the following code: $("#send-mail").validate({ debug: true, // set this class to error-labels to indicate valid fields success: function(label) { // set text as tick label.html("✔").addClass("valid"); }, // the errorPlacement has to take the table layout into account errorPlacement: function(error, element) { console.log("errorPlacement called for "+element.attr("name")+" field"); // check for blank/success error if(error.text() == "") { // remove field title/error message from element element.attr("title", ""); console.log("error check passed"); } else { // get error message var message = error.text(); // set as element title element.attr("title", message); // clear error html and add cross glyph error.html("✘"); console.log("error check failed: "+message); } // add error label after form element error.insertAfter(element); }, ignoreTitle: true, errorClass: "invalid" });

    Read the article

  • CSS Flexible Height with scrollable content

    - by th3hamburgler
    I'm looking to create a flexible width/height page layout with no window scrollbars! Any content that will not fit on the page should be scrollable independently with the overflow property. I've seen plenty of ways to construct flexible width layouts using just HTML and CSS. The following site does a pretty good job on that front: http://ago.tanfa.co.uk/css/layouts/css-3-column-layout-v1.html I wish to implement scrollable content within the 3 centre columns. The content should be scrollable not the column div. e.g. <div class="column"> <h4>Title</h4> <ul> <li>These</li> <li>Items</li> <li>Should</li> <li>Be</li> <li>Scrollable</li> <li>If</li> <li>They</li> <li>Exceed</li> <li>The</li> <li>Window</li> <li>Height</li> </ul> So far if the list exceeds the window height it pushes the footer off page. I'm not to bothered about it working on old versions of IE, although that would score bonus points!

    Read the article

1