PharoJs with JQuery/JQuery-ui
Hi - Can anyone give an example of how to use Jquery-ui in PharoJs? I would like to use PharoJs to generate a page with a jquery-ui Slider widget and process its events through its slide function. To give an illustration - what is the PharoJs equivalent to this javascript (in the $(document).ready function)? $( "#slider" ).slider( { range: false, min: 90, max: 290, value:100, slide: function( event, ui ) { $( "#gradeECF" ).html("ECF:" + ui.value); $( "#gradeElo" ).html( "Elo: " + (ui.value\*7.5 + 700));} } ); Thanks in advance for any help
Hi, PharoJS exports vanilla JS. There is no support for JQuery. Having said that, PharoJS allow writing Pharo code with references to JS globals. So, you can directly use JS APIs. window addEventListener: #load block: [ window alert: 'Done Loading!!'. console log: 'PharoJS signals end of loading'] Noury On May 6 2022, at 5:30 pm, voxkmp@gmail.com wrote:
Hi -
Can anyone give an example of how to use Jquery-ui in PharoJs? I would like to use PharoJs to generate a page with a jquery-ui Slider widget and process its events through its slide function. To give an illustration - what is the PharoJs equivalent to this javascript (in the $(document).ready function)? $( "#slider" ).slider( { range: false, min: 90, max: 290, value:100, slide: function( event, ui ) { $( "#gradeECF" ).html("ECF:" + ui.value); $( "#gradeElo" ).html( "Elo: " + (ui.value*7.5 + 700));} } ); Thanks in advance for any help
participants (2)
-
Noury Bouraqadi -
voxkmp@gmail.com