X
Thinta lapha ukuze uye kuveshini yamakhalekhukhwini kusayithi.

Isithangami Sabeseki

Lolu chungechunge lwabekwa kunqolobane. Uyacelwa ubuze umbuzo omusha uma udinga usizo.

How do I use jQuery in my Thimble project

Kuphostiwe

I want to include some javascript to animate elements in my project with jquery. I plan to hack at this but I don't see any reference to usage of external libraries in documentation or by web searches, so I hoping that it is possible. I am surprised that I seem to be the first to ask this.

I want to include some javascript to animate elements in my project with jquery. I plan to hack at this but I don't see any reference to usage of external libraries in documentation or by web searches, so I hoping that it is possible. I am surprised that I seem to be the first to ask this.

Eminye Imininingwane Yohlelo

Isisebenziso

  • I-ejenti Engumsebenzisi: Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.116 Safari/537.36

Eminye Imininingwane

Umnikazi wombuzo

Ok - "solved" it. It just works as you think it would - with one extra step.

1. include standard script entries in the header (1 for jquery, 1 for my custom code)

 <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
 <script src="script-1.js"></script>

2. Add some jquery code to your js...

$(document).ready(function() {

 alert($("head title")[0].innerHTML);

});

THAT EXTRA STEP: Click the circle-arrow button to refresh the preview. (Doh!)

Yeah - the site is so responsive - i didn't even notice there was a refresh button.

Ok - "solved" it. It just works as you think it would - with one extra step. 1. include standard script entries in the header (1 for jquery, 1 for my custom code) <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script> <script src="script-1.js"></script> 2. Add some jquery code to your js... $(document).ready(function() { alert($("head title")[0].innerHTML); }); THAT EXTRA STEP: Click the circle-arrow button to refresh the preview. (Doh!) Yeah - the site is so responsive - i didn't even notice there was a refresh button.