This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function IsEmail(email) { | |
| var regex = /^([a-zA-Z0-9_\.\-\+])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/; | |
| return regex.test(email); | |
| } | |
| //m_c1_txtReqEmail | |
| var TempEmail = $('#m_c1_txtReqEmail').val(); | |
| if (IsEmail(TempEmail) == false) { | |
| $('#m_c1_txtReqEmail').addClass("error"); | |
| error += "\n - Invalid Email Address"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $(window).scroll(function () { | |
| $('#object').css({ | |
| 'bottom' : -($(this).scrollTop()/10)+"px" // increase # to make even slower | |
| }); | |
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <div class="status">polling ...</div> | |
| <script type="text/javascript"> | |
| $(document).ready(function() { | |
| (function poll() { | |
| setTimeout(function() { | |
| $.ajax({ | |
| url: "/websites/1.json", | |
| type: "GET", | |
| success: function(data) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /********************************* | |
| MAIL LINKS | |
| *********************************/ | |
| $('a[href^="mailto"]').each(function(){ | |
| var $link = $(this); | |
| var href = $link.attr('href'); | |
| var text = $link.text(); | |
| href=href.replace('[AT]','@'); | |
| href=href.replace('[DOT]','.'); | |
| text=text.replace('[AT]','@'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $(window).resize(function() { | |
| var width = $(window).width(); | |
| if (width < 960) { | |
| // Do Something for example "$('body').addClass('960');" | |
| } | |
| else { | |
| //Do Something Else | |
| } | |
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //Limit max characters in textarea | |
| $(".textarea-limit").each(function () { | |
| var thistextarea = $(this); | |
| var characters = thistextarea.prop('maxlength'); | |
| thistextarea.prev('label').append("<span class='limit-counter'>You have <strong>"+ characters+"</strong> characters remaining</span>"); | |
| var counter = thistextarea.prev('label').find('.limit-counter'); | |
| counter.css('float','right'); | |
| function displaycounter(countervar) { | |
| var remaining = characters - countervar.val().length; | |
| counter.html("You have <strong>"+ remaining+"</strong> characters remaining"); |