
jQuery used to offer a easy and quick compatible development through all browsers. It avoids dealing with browsers which didn’t support the W3C standard like Internet Explorer. However, nowadays with current updated browsers you don’t need jQuery anymore. Instead of jQuery you should use directly JavaScript.
// jQuery
$(element).html(string);
// JavaScript
element.innerHTML = string;
You can check a great jQuery use comparation with different versions of IE at HubSpot made by Zack Bloom and Adam F Schwartz: YOU MIGHT NOT NEED JQUERY
Anyway, if you still need jQuery (old projects/dependencies) and you want to have a ~5-10k modular library that downloads and executes fast with a familiar and versatile API, you can try Zepto, a minimalist JavaScript library for modern browsers with a largely jQuery-compatible API. If you use jQuery, you don’t need to learn Zepto, just change jquery.min.js for zepto.min.js and that’s all.
Unhide automatically one topic per week in Moodle
/in CSS3/by GénesisWe can hide and unhide manually topics in Moodle but we cannot do it automatically, maybe it will be developed in next versions but till then you can do it by yourself easily. Using Weekly format with Bootstrap default theme you can get “Current Week Class” (current), so the only thing you have to do it’s just hide every week after that one.
It’s working since Moodle 2.7.1 up to 2.9.1+.
See a real example:
Furthermore, if you want to have different students in different weeks in the same course (e.g. John in the second week and Jennifer in the last one) you can use “Self enrolment” to make courses start depending on when the students want to start the course and “Cohort” to avoid “Self enrolment” access to some courses.
Which is the different between property and attribute?
/in HTML5, JavaScript/by GénesisA property is in the DOM; an attribute is in the HTML that is parsed into the DOM.
HTML Attributes
Syntax:
DOM Properties
Syntax:
Using jQuery
If we have:
See a real example:
Upload a file with jQuery without opening a new page
/in JavaScript/by GénesisIn this example we are going to upload a file to our url using AJAX with jQuery.
Here if you want you can download my AJAX logo and use it for free: AJAX logo
Helios Lighting System Infographic
/in Design/by GénesisOne of my first infographic at IHMAN 🙂
You don’t need jQuery any more!
/in JavaScript/by GénesisjQuery used to offer a easy and quick compatible development through all browsers. It avoids dealing with browsers which didn’t support the W3C standard like Internet Explorer. However, nowadays with current updated browsers you don’t need jQuery anymore. Instead of jQuery you should use directly JavaScript.
You can check a great jQuery use comparation with different versions of IE at HubSpot made by Zack Bloom and Adam F Schwartz: YOU MIGHT NOT NEED JQUERY
Anyway, if you still need jQuery (old projects/dependencies) and you want to have a ~5-10k modular library that downloads and executes fast with a familiar and versatile API, you can try Zepto, a minimalist JavaScript library for modern browsers with a largely jQuery-compatible API. If you use jQuery, you don’t need to learn Zepto, just change jquery.min.js for zepto.min.js and that’s all.