Recently we ran into an annoying problem. Say you have a div with some dynamic text. Sometimes the text is short, so should be displayed in its entirety. Other times - it’s too long, so should be partly hidden. However, differently from hiding the text completely and then using jQuery’s .slideDown() of simply .show(), we wanted to display first few lines of it and give user the ability to show the rest. Also, and this part is very important - the revealing of the whole text should be animated (sort of the .slideDown() effect).
Kartogram’s new website has gone live! Go on, come and have a look around...!
It’s been a while now that we were searching for a working ColdFusion LinkedIn API that would let users not only to receive data, but to submit some too. Although there were optional libraries such as linkedin-j, not everyone knows or wants to dip into the pure java world. Thanks to Derek Bowes, we stumbled across the LinkedIn.cfc which was a great plugin. The only trouble was that the plugin was already out of date since LinkedIn had updated their API in the second half of 2012, and now required member permissions were no longer a part of the original source code.
So we took the initiative to our hands and amended the plugin to allow users set the permissions required as well as the ability to post status updates.
So, the situation here is very straigth forward: you want to use $(document).one handler on something like pop-up settings box, which should be closed if user clicks anywhere outside of it. But what if the settings box in question has some elements inside it that need a separate handling and should keep the box open? Read inside on how to skip document.one event in such cases.
If you use jQuery, you’ve certainly came across the trim() function. It’s the quickest and painless way to remove the white space from the beginning and end of a string. However as much as jQuery tries to cover cross-browser compatibility, there’s just this little that always gets missed out on. For a quick workaround read inside.