HTML5 canvas

2011-06-21 | 2:26 pm | Kein Kommentar »

Tutorial zu canvas

malen-nach-zahlen

jquery-json tutorial

jquery und prototype

2009-05-18 | 11:28 am | Kein Kommentar »

Problem: Namenskonflikt beim Shortcut $

Abhilfe: jQuery.noConflict()

Wichtig: Einbindung der Prototype Biliothek vor der jQuery Bibliothek.

<script src="prototype.js">
<script src="jquery.js"></script>
<script>
    var $j = jQuery.noConflict();

    // Use jQuery with $j(...)
    $j(document).ready(function(){
       $j("div").hide();
     });

     // Use Prototype with $(...)
     $('someid').hide();
</script>

Links

Using jQuery with other Libraries

data
status
net

jquery

<script>
$(document).ready(function() {
  $("div.acs_content_div").eq(0).show().siblings("div").hide();

  $("a.acs_tab").click(function() {
    acs_tab_id= $(this).attr("id");
    acs_content_id= acs_tab_id.replace(/tab/, "content");
    $("#" + acs_content_id).show().siblings("div").hide();    
  });
});
</script>

prototype (1.5)

<script>
Event.observe(window,'load', function () {
  $$('.acs_content_div').each(Element.hide);
  $('acs_content_data').show();

  $$('.acs_tab').each(function (tab, ix) {
    tab.observe('click', function(e) {
      $$('.acs_content_div').each(Element.hide);
      var acs_tab_id= tab.getAttribute("id");
      var acs_content_id= acs_tab_id.replace(/tab/, "content");
      $(acs_content_id).show();
    });
  });
});
</script>

simple open new window

function fenster(url) {
  newin = window.open(url,"name","depend=yes,width=400,height=500,  \
  menubar=yes,scrollbars,status=yes,resizable");
  newin.focus();
}

tata – save data in file


saveData(data);
function saveData(data) {
    return window.open("data:x-application/gaga; charset=utf-8," + escape(data));
}

timeline [jquery]

2008-08-26 | 2:50 pm | Kein Kommentar »

slider gaga

Slider moved to

Timeline Example

Links

cookies [jquery]

2008-08-14 | 4:15 pm | Kein Kommentar »

cookies setzten mit jquery

var CN = "gdun";
var CV =  "Wasserfall:1218717451##Goldkammer:1218655401##Ixidion:1218546505";

// cookie setzen 
$.cookie(CN, CV, {expires: 10}); 

// cookie auslesen 
alert($.cookie(CN));

// cookie loeschen 
$.cookie(CN, null);


var dd;
 if (CV != null) {
      dd = CV.split("##");
}

for (i in dd) {
   dd[i] = dd[i].split(":");
}

var ddList = "";
for (i in dd) {
   ddList += '<tr>'
               + '<td>' + dd[i][0]+ '</td>'
               + '<td>' + dd[i][1]+ '</td>'
               + '</tr>';
}
$("#ddList").html(ddList);

links

<a name=“blub“>
<a href=“#blub“>
window.location.hash = „#“ + „blub“;

fade show [jquery]

2008-06-19 | 1:29 pm | Kein Kommentar »

Example moved to

Fadeshow

Enjoy :)

tablesorter [jquery]

2008-05-7 | 2:55 pm | Kein Kommentar »

tablesorter plugin

Das tablesorter plugin und eine Zeile javascript machen aus einer Tabelle eine sortierbare Tabelle.

$('#myTable').tablesorter( {widgets: ['zebra']} );

Fuer diese Tabelle wurde das blue theme des tablesorter Plugins leicht abgewandelt.

null eins zwei drei vier
januar aaa Katze 10.03.2007 40,345
maerz bbb lief 11.04.2003 40.345
oktober ccc im 07.02.2009 20.222
oktober ddd Schnee 01.08.2007 20,111
maerz eee katze 02.08.2007 39,009
oktober fff lief 04.04.2004 39
oktober ggg im 05.05.2007 46,21
januar hhh schnee 05.06.2007 39,0
maerz iii katze lief 06.05.2007 15.0
oktober jjj Katze schlief 05.05.2008 22,07
maerz kkk miau 01.01.1977 27,77

Multi-column sorting

Sort multiple columns simultaneously by holding down the shift key and clicking a second, third or even fourth column header!

Nach deutschformatigem Datum sortieren

Das tablesorter Plugin kann nicht nach deutschem Datum sortieren, aber man kann es ihm beibringen:

  • Nach „dateFormat“ suchen.
  • Datumstrenner um „.“ erweitern (is-Funktion)
  • uk-Zweig von dateFormat kopieren und in „de“ umbenennen
  • „.“ bzw „\.“ in der regular Expression ergaenzen

links