Skip to content

Instantly share code, notes, and snippets.

@mpl
Created May 19, 2016 00:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mpl/cec8be5ff2062538b729ba4ad11831fb to your computer and use it in GitHub Desktop.
Save mpl/cec8be5ff2062538b729ba4ad11831fb to your computer and use it in GitHub Desktop.
package main
import (
"encoding/json"
"fmt"
"io/ioutil"
"net/http"
"strings"
"sync"
"camlistore.org/pkg/blob"
"camlistore.org/pkg/search"
"github.com/gopherjs/gopherjs/js"
"github.com/gopherjs/jquery"
)
//convenience:
var jQuery = jquery.NewJQuery
const (
BIC = "div#blobitemcontainer"
)
var theBic BlobItemContainer
func main() {
//show jQuery Version on console:
print("Your current jQuery version is: " + jQuery().Jquery)
theBic = BlobItemContainer{redraw: true}
if err := theBic.populate(); err != nil {
print(fmt.Sprintf("Error populating items: %v", err))
} else {
theBic.Render()
}
jQuery(js.Global).Scroll(func(e jquery.Event) {
theBic.Render()
})
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment