Tagjavascript

Thickbox and jQuery in WordPress 2.8

The update was great! The new features in WordPress 2.8 are awesome! Most of my Twitter friends have updated to 2.8 and haven’t had a single issue. The new widgets area is so cool! Oh jeez, I’m so excited. For a full features list check out Version 2.8 section in the Codex. Anyway, the only issue I had so far is the Thickbox usage. I’m not sure why it’s lost, but...

Javascript in WordPress: 2 Functions 2 Save Your Day

I’ve introduced Javascript mode in the latest update of Quick Flickr Widget (1.2.7) for WordPress, and I just wanted to give you a short advice about handling javascript code in your WordPress plugins. The wp_enqueue_script WordPress function helps you add javascript code to your head section, so you don’t have to mess up with the header.php file. One of the frequently asked questions...

jQuery in WordPress: wp_enqueue_script

Did anybody notice the new sitemap I did for the blog? Top-right, in the black part. Click on sitemap. Smooth! For those of you who don’t know, that’s jQuery. Okay, seriously, this is my first ever jQuery script because I love Prototype. I don’t know why I did that, since I could have done it with Scriptaculous. So, about scripts in WordPress… You all heard about the...

Javascript: Element Suicide

A short tip on js suicide. Suicide? Well.. I mean have an element remove itself. I came across this a while ago: a ‘read more’ link which should set the display property of an element to ‘block’ and remove itself completely from the DOM. Plain javascript, no frameworks. Here’s what I came to: this.parentNode.removeChild(this); It doesn’t require an id, name or...