Skip to content

Instantly share code, notes, and snippets.

View lazypower's full-sized avatar
💭
Bring back independent blogs, rss feeds, and the small web.

Charles "Chuck" Butler lazypower

💭
Bring back independent blogs, rss feeds, and the small web.
View GitHub Profile
$(document).ready(function()
{
$("ul.lfm-thumb li").hover(function() {
if ($(this).hasClass("lfm-lefborder")) {
marTop = '110px';
marLeft = '110px';
} else {
marTop = '-110px'; /* The next 4 lines will vertically align this image */
marLeft = '-110px';
}
jQuery(document).ready(function(){
//prevent the DatePicker default event handler from causing a full page refresh
jQuery('#schedule').click(function(e){
e.preventDefault();
});
jQuery('#schedule').datepicker({
onSelect: function(dateText, inst) { // receiver params - selected date, instance of datepicker
var name = jQuery( "#name" ),
#-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= #
### Created by Brad Sims <tanfj@yahoo.com> 25/06/2004
### I got tired of .screenrc's on the internet being so
### poorly commented... So being a good GNUbie I took matters
### into my own hands; and wrote this dotfile.
# =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= #
$(document).ready(function()
{
$("ul.lfm-thumb li").hover(function() {
if ($(this).hasClass("lfm-lefborder")) {
marTop = '110px';
marLeft = '110px';
} else {
marTop = '-110px'; /* The next 4 lines will vertically align this image */
marLeft = '-110px';
}
<%@ Page Title="University Bound Scholarship Program" Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="Scholarship_Default" %>
<%@ Register Src="~/controls/scholarshipForm.ascx" TagPrefix="ub" TagName="ScholarshipForm" %>
<%@Register Src="~/controls/VideoScholarship.ascx" TagPrefix="ub" TagName="VidBox" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
<head runat="server">
<meta charset="utf-8"/>
<!--[if IE]><![endif]-->
<?PHP
$lastfm = new LastFm();
$albums = $lastfm->user_getRecentTracks("user=lazypower");
//$shouts = $lastfm->user_getShouts("user=lazypower");
$info = $lastfm->user_getInfo("user=lazypower");
?>
@lazypower
lazypower / default.html
Created April 14, 2011 15:54
iterates through a json data string and parses them into an unordered list for pagination.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
<head><meta charset="utf-8" />
@lazypower
lazypower / gist:920475
Created April 14, 2011 20:38
Iterates through a json data string, and clones a HTML DOM template, then replaces the object inside the template, and re-appends it to the specified element. NOICE! Didnt know you could manipulate detached dom objects.
$(function()
{
// Everything should start with 0 when count arrays. Just good practice
var count = 0;
// We know we're going to need to start with at least one unordered list, so we create it outside the loop. Why not?
obj = $('<ul>');
// Now that the blank ul object is created we need to assign it with a unique id. Well we don't *need* to, but it's good
// for semantics to have IDs be unique.
//obj.attr('id', 'vid-playlist' + count);
@lazypower
lazypower / foo.js
Created April 14, 2011 23:30
Marco, can you read this better than my normal spaghetti?
function EmbedVid(someID)
{
html = $('#embed-template').clone();
html.attr('flashvars','value="file=upload/' + someID + '.flv&amp;image=images/vidThumbs/' + someID + '.jpg"');
html.find('embed').attr('flashvars','file=upload/' + someID + '.flv&amp;image=images/vidThumbs/' + someID + '.jpg"');
// better clear the video holder
$('#video-holder').empty();
$('#video-holder').append(html.children());
}
// wrap this in the document.ready method, so it knows what to attach to
$(document).ready(function()
{
$(function () {
//playlist builder
$(function()
{