Tag Archives: jquery

Angular JS basic

<script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js"></script>
<div>
 
Name : <input type="text" />
<h1>Hello {{name}}</h1>
</div>

Some quick notes

  • must be within ng-app
  • can specify default value with ng-init
  • ng-model to define value to be displayed later in place holder
  • use double curly braces as place holder to display value hold by ng-model

Some other bootstrap-related tools to study

Found some other tools worth exploring

Visual Editor

  • bootply.com – online visual bootstrap editor
  • pingendo – free, native (download and install)
  • pinegrow.com – paid (starts at usd49), native + online demo
  • layoutit – free, online editor
  • jetstrap.com – paid

Snippets, tools, themes etc.

  • bootsnipp.com – snippets, form builder
  • startbootstrap.com – theme and templates

Others

  • bootstrap magic – change theme, color and other default look for bootstrap based on your preference
  • codiqa.com – build mobile app easily. nice and easy interface
  • x-editable – library to easily update data in-line without whole form submission
  • bootbundle.com – theme, template, plugins etc. many sites on one.
  • list of more plugins and tools

Export as .csv with jQuery

This is so simple and very useful for reporting purpose. You can easily export your html table to .csv format with this jquery scripts.

Step 1: Html File

<form action="getCSV.php" method="post">
<input id="csv_text" name="csv_text" type="hidden" />
<input onclick="getCSVData()" type="submit" value="Get CSV File" />
 
<script type="text/javascript"><!--mce:0--></script>
</form>

Step 2: PHP File ( getCSV.php )

<!--?php
header("Content-type: application/octet-stream");
header("Content-Disposition: attachment; filename=\"my-data.csv\"");
$data=stripcslashes($_REQUEST['csv_text']);
echo $data;
?-->

Thanks to the code writer
source: http://www.kunalbabre.com/projects/table2CSV.php

Include google-hosted jquery

If you are lazy to copy and paste the jquery file to your development folder for example when testing something simple, you can always use jquery hosted by google. To include it is very simple, you just include this script on the top and you’re done.

1
2
3
4
<script src="http://www.google.com/jsapi"></script>
<script>
   google.load("jquery", "1.3");
</script>

You are ready to use the jquery. Yahooo.. ups.. Goooooglee!!