Site Tools


Hotfix release available: 2024-02-06a "Kaos". upgrade now! [55.1] (what's this?)
New release available: 2024-02-06 "Kaos". upgrade now! [55] (what's this?)
onny:notizen:programmierung

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revisionBoth sides next revision
onny:notizen:programmierung [2022/03/19 14:38] – old revision restored (2022/03/17 13:00) 2001:41d0:1004:60b::onny:notizen:programmierung [2022/09/05 13:43] – [javascript] 10.25.0.100
Line 176: Line 176:
 </code> </code>
 ===== javascript ===== ===== javascript =====
 +
 split up javascript files split up javascript files
 <code javascript> <code javascript>
Line 192: Line 193:
 }(MODULE || {})); }(MODULE || {}));
 </code> </code>
 +
 jquery select by attribute content jquery select by attribute content
 +
 <code javascript> <code javascript>
 $( "tr[data-id='"+data[station]["stationid"]+"']" ).remove(); $( "tr[data-id='"+data[station]["stationid"]+"']" ).remove();
Line 203: Line 206:
 }); });
 </code> </code>
 +
 jquery set background color jquery set background color
 +
 <code javascript> <code javascript>
 $(this).parent().css("background-color", "yellow"); $(this).parent().css("background-color", "yellow");
Line 211: Line 216:
 console.log('%d: %s', i, value); console.log('%d: %s', i, value);
 </code> </code>
-javascript document ready+ 
 +on document ready 
 <code javascript> <code javascript>
-$(document).ready(function(){ +document.addEventListener("DOMContentLoaded", function() { 
-  console.log('ready');+  your_function(...);
 }); });
 +
 </code> </code>
-vanilla js change content text+ 
 +change content text 
 <code javascript> <code javascript>
     var webgl_field = document.getElementById('webgl');     var webgl_field = document.getElementById('webgl');
Line 257: Line 267:
  
 trim string to max length trim string to max length
 +
 <code javascript> <code javascript>
 var string = string.substring(0,100); var string = string.substring(0,100);
 </code> </code>
  
-vanilla js onclick class element+onclick class element 
 <code javascript> <code javascript>
 document.getElementsByClassName('navbar-burger')[0].onclick = function(){ document.getElementsByClassName('navbar-burger')[0].onclick = function(){
   console.log('ready');   console.log('ready');
 }; };
 +</code>
 +
 +smooth scrolling anchor links
 +
 +<code javascript>
 +document.addEventListener("DOMContentLoaded", function() {
 +  your_function(...);
 +});
 </code> </code>
 ==== vuejs ==== ==== vuejs ====
onny/notizen/programmierung.txt · Last modified: 2023/11/07 15:40 by 127.0.0.1