Javascript JQuery

Short Note: Colorbox moving Close button on Top right

By default Colorbox Close button is on Bottom Right. However moving it back to top is as simple as changing Position of div from bottom to top. All I have done is change bottom: x to top: x for all child of cboxContent class. which include cboxLoadedContent, cboxTitle, cboxCurrent, cboxSlideshow, ,cboxPrevious ,cboxNext,cboxClose

Note for myself, and those who find it useful.


Colorbox: Alternative for Lightbox

I have got lot of queries on my Lightbox + Videobox merge code. But over time I realize my merged code is not good enough as now with dynamic web, that code is limited. It is said to see such great software didn’t evolve much. But as a developer we cannot stop for one code and hence here is great alternative for virtually all sort of Lightbox effect for anything, It is called Colorbox ( I used it so far to display, Tell a Friend form, Dynamic Form created based on User Input, a Cool Slideshow. Not much, but all looks great with its control using Jquery.

I am really a great fan of Jquery, it change the web developer’s life to make Great website out of Good websites. Long Live JQuery and ColorBox. Thanks for sharing it with us.

Code Snippets Javascript Programming

LightBox Vs VideoBox Vs Custom Code

Recently I was given a task to make LightBox and VideoBox work on same page, where we have Images and Video to show. However, Videobox is inspired by Lightbox as per developer, they are not compatible with each other. The reason I found is that they share few variable and hence they are breaking each other’s code. Now since we need functionality to be done, I have give to find a quick alternative solution..When my company said quick solution they mean a solution in next 1 hr.

Let us check what we can do..Lightbox, read image tag with a tag and show image based on those, and this is what Videobox do, it read for “rel=vidbox” in anchor tag, and then it detect the type of video source to display the item in bigger div. What I do is I modify it to recognize images as well, i.e. if we put rel=”vidbox” in anchor tag for your images, (something we do in lightbox) my modified VideoBox code will read and check for extension jpg, jpeg, gif,png and if found i write “custom code” in variable this.other to show img tag instead of SWFObject or other.

Now VideoBox is no more a video only box, and it can handle Images for me as well :).

Download modified VideoBox Code