Skip to content

Instantly share code, notes, and snippets.

var getData = function(url, flag,fn) {
if (isAjax == true) {
isAjax = false;
$(".loading").css("display", "none");
$.ajax({
url: url,
type: "GET",
dataType: "html",
success: function(html) {
$(".dlist").append(html);
@firhome
firhome / imgs.js
Created April 15, 2013 08:18
imgs
$(document).ready(function(){
var setting_img = function(dom_width,allimg,scale){
var dt_width = dom_width[0].offsetWidth;
if(scale){
var n1 = parseInt(scale.split(':')[0]),n2 = parseInt(scale.split(':')[1]);
var img_height = (dt_width / n1) * n2;
}else{
.swipe_text {position: relative;width:300px;overflow: hidden;}
.swipe_text .c_b {float:left;position: relative;overflow: hidden;}
.swipe_text .c_b li {float:left;width:300px;background:#fff;position: relative;}
<div class="swipe_text">
<div id="swipeText">
<ul class="c_b">
<li><a href="###" title="">全部(1)</a><a href="###" title="">全部(1)</a><a href="###" title="">全部(1)</a></li>
<li><a href="###" title="">电影(1)</a><a href="###" title="">电影(1)</a><a href="###" title="">电影(1)</a></li>
<li><a href="###" title="">综艺(1)</a><a href="###" title="">综艺(1)</a><a href="###" title="">综艺(1)</a></li>
@firhome
firhome / h5g
Last active December 15, 2015 23:49 — forked from wintercn/h5g
A sample of HTML5 game
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8" />
<!--允许全屏-->
<meta content="yes" name="apple-mobile-web-app-capable"/>
<meta content="yes" name="apple-touch-fullscreen"/>
<!--禁止电话号码和邮箱识别-->
<script></script>
@firhome
firhome / sublime
Created April 8, 2013 02:48
just test
sdafdsa fdsaf dsafsa fsad
@firhome
firhome / test
Created April 8, 2013 02:43
test gist
save