Skip to content

Instantly share code, notes, and snippets.

View Samnan's full-sized avatar
⚒️

Samnan ur Rehman Akhoond Samnan

⚒️
View GitHub Profile
@Samnan
Samnan / gist:1044595
Created June 24, 2011 11:19 — forked from juareznjunior/gist:669067
jquery.ui.table
.ui-table {width:100%}
.ui-table thead tr,
.ui-table tfoot tr,
.ui-table-header { background: #cccccc url(images/ui-bg_glass_75_cccccc_1x400.png) 50% 50% repeat-x; font-weight: normal; color: #000000; outline: none;text-shadow:1px 1px 1px white}
.ui-table th,.ui-table td {font-weight:bold;text-align:left;padding:0.5em 0.3em;border:1px solid #ffffff;border-width:0 0 1px 1px}
.ui-table thead th {border-width:0 0 1px 1px;text-align:center}
.ui-table thead > tr > th:first-child,.ui-table tfoot > tr > th:first-child {border-width: 0 0 1px}
.ui-table tbody > tr > td:first-child {border-width: 0 0 1px 0}
.ui-table tbody td {font-weight:normal}
.ui-table .text-center,.ui-table .text-center * {text-align:center}
@Samnan
Samnan / remote.php
Created June 24, 2011 11:19 — forked from icyleaf/remote.php
HTTP Request/Response Library
<?php
/**
* Provides remote server communications options using [curl][ref-curl].
*
* [ref-curl]: http://php.net/curl
*
* @author icyleaf <icyleaf.cn@gmail.com>
* @link http://icyleaf.com
* @version 0.3.1
* @license http://www.opensource.org/licenses/bsd-license.php
@Samnan
Samnan / gist:1044597
Created June 24, 2011 11:21 — forked from SamWM/gist:266176
jQuery UI Image Dialog (to replace thickbox)
$("a.thickbox").click(
function(e) {
e.preventDefault();
var link = this;
var $loading = $("<div></div>").dialog({ title: "Loading..." });
$("<img>").attr({ "src": this.href }).css({ "padding": 0 }).load(
function() {
$loading.dialog("destroy").remove();
var maxWidth = $(window).width() - 20;
var maxHeight = $(window).height() - 20;
@Samnan
Samnan / jalert.js
Created June 24, 2011 11:22 — forked from ecounysis/jalert.js
jQuery UI plugin for themed alerts and dialogs
/*
* jalert jQuery JavaScript Plugin v0.0.1
*
* Copyright 2010, Eric Christensen
*
* Permission to use, copy, modify, and distribute this software and its
* documentation for any purpose and without fee is hereby granted, provided
* that the above copyright notice appear in all copies and that both that
* copyright notice and this permission notice appear in supporting
* documentation, and that the name of the copyright holder not be used in
@Samnan
Samnan / addressfinder-jqueryui.js
Created June 24, 2011 11:23 — forked from campreb/addressfinder-jqueryui.js
AddressFinder using jQuery UI autocomplete
$("#ac_me").autocomplete({
source: function( request, response ) {
$.getJSON("http://api.addressfinder.co.nz/search/location?callback=?",
{q:request.term,key:"YOUR-API-KEY"},
function( data ) {
response( $.map( data.results, function( item ) {
return {
label: item.a,
pxid: item.pxid
}
@Samnan
Samnan / jquery.combobox.js
Created June 24, 2011 11:58 — forked from BigBlueHat/jquery.combobox.js
improved version of Combobox code from jQuery UI docs
/**
Copyright 2011 Couchbase, Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
//
// jQuery UI combobox
// Based on the combobox example on the jQuery UI home page.
// Must load both jQuery and jQuery UI Widgets before loading this document.
// I use CSS to position the button inside the input element, so it looks just
// like a drop down box.
//
$.widget("ui.combobox", {
_create: function () {
var self = this;
@Samnan
Samnan / 1.8.js
Created June 24, 2011 13:06 — forked from scottgonzalez/1.8.js
quick overview of extending jQuery UI widgets in 1.8 and 1.9
(function( $, prototype ) {
$.extend( prototype.options, {
spinner: "<em>Loading&#8230;</em>"
});
var _create = prototype._create;
prototype._create = function() {
_create.call( this );
var self = this;
@Samnan
Samnan / jquery.ui.menu.js
Created June 24, 2011 13:07 — forked from creationix/jquery.ui.menu.js
OS style dropdown menu as a jQuery-UI plugin
(function($) {
$.widget("ui.menu", {
active: false,
last_activated: null,
last_menu_level: null,
last_level: null,
timer_id: null,
_init: function() {
this._menufy();
},
@Samnan
Samnan / jqueryui-dialog-message.js
Created June 24, 2011 13:08 — forked from chicagoworks/jqueryui-dialog-message.js
jQuery UI dialog extension to set the message body of the dialog similar to the way dialog title is set.
var __setOption = $.ui.dialog.prototype._setOption;
$.extend($.ui.dialog.prototype, {
_setOption : function (key, value) {
var self = this,
uiDialog = self.uiDialog;
if (key === 'message') {
self.element.html("" + (value || '&#160;'));
}
__setOption.apply(self, arguments);
}