ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage functions / Web-specific functions / Miscellaneous WEBDEV functions
  • Parameters of jQuery function
  • Loading the jQuery library and its extensions
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
Runs a JavaScript method (or several chained methods) of the jQuery library on a page element.
This function is an advanced feature: a good knowledge of JavaScript and jQuery library is required.
Example
// A single jQuery function is used
jQuery(STC_1).fadeOut()
// Use with 2 chained functions
// The opacity of control is modified, then the control explodes before it disappears
jQuery(CELL_Square).fadeTo("opacity",0.1).effect("explode")
Syntax

Running a command of jQuery library Hide the details

<Result> = jQuery(<WEBDEV control>).<jQuery function>(<Parameter 1>, ..., <Parameter N>)
<Result>: Expected type
Return value of jQuery method called.
<WEBDEV control>: Control name
Name of control that will be used in the page.
Remark: The option "The control can be overlaid" must be checked for the control ("UI" tab in the control description window).
<jQuery function>: Character string
Name of jQuery function to run.
Caution: JavaScript being case sensitive, the function name must respect the case used in the jQuery library.
<Parameter 1>: Character string
First parameter expected by the jQuery function.
<Parameter N>: Character string
Nth parameter expected by the jQuery function.

Running several chained commands of jQuery library Hide the details

<Result> = jQuery(<WEBDEV control>).<jQuery function 1>(<Parameter 1>, ..., <Parameter N>).<jQuery function 2>(<Parameter 1>, ..., <Parameter N>)
<Result>: Expected type
Return value of jQuery method called.
<WEBDEV control>: Control name
Name of control that will be used in the page.
<jQuery function 1>: Character string
Name of first jQuery function to run. Caution: JavaScript being case sensitive, the function name must respect the case used in the jQuery library.
<Parameter 1>: Character string
First parameter expected by the jQuery function.
<Parameter N>: Character string
Nth parameter expected by the jQuery function.
<jQuery function 2>:
Name of second jQuery function to run. Caution: JavaScript being case sensitive, the function name must respect the case used in the jQuery library.
Remarks

Parameters of jQuery function

If a procedure ("Callback") must be passed to one of the jQuery functions, the browser procedure must be passed by reference (function name preceded by "&"). For example:
jQuery(BTN_Add).on("click", &OnAddition)

Loading the jQuery library and its extensions

A jQuery library is provided with WEBDEV but you have to include another library in replacement or include extensions (jQuery-UI for example).
You can:
  • include the local or remote script (recommended method).
  • use the "<script src = ...> tag.
Method 1: Including the script file (local or remote (URL)) (recommended method)
  1. Display the description window of the page ("Description" in the context menu).
  2. Select the "Advanced" tab.
  3. Select the "External resources (JavaScript/CSS)" tab.
  4. To reference:
    • a remote script, copy/paste the address (URL) of the script file into the "JavaScript resources" column.
    • a local script (file found on your computer for example), click the "+" button of "JavaScript resources" and select the corresponding file.
Caution: Check the order of script dependencies (the jQuery library then its extensions).
Method 2: Adding the tagging for script insertion:
  1. Display the description window of the page ("Description" in the context menu).
  2. Select the "Advanced" tab.
  3. Select the "HTML" tab.
  4. Copy the following lines of code into the "HTML code added to the page header" section. For example:
    <script src="http://code.jquery.com/jquery-1.9.1.js"></script>
    <script src="http://code.jquery.com/ui/1.10.3/jquery-ui.js"></script>
Caution:
  • The code must be inserted into the "HTML code added to the page header" section and not into the "HTML code added at the end of page" section. Exception: If you want to include an extension without including another jQuery library, you must:
    • Use the method that uses the tagging.
    • Copy the code into the "HTML code added at the end of page" section.
  • This method is not recommended because the script load interrupts the page load. The loading and the page display are slowed down.
Component: WDJS.DLL
Minimum version required
  • Version 19
Comments
Exemplo jquery

// No WebDev 22 , nao precisa baixar jquery , é automatico

// Exemplo: Explode Componente

jQuery(IMG_Matos).effect("explode")

// blog com video e exemplo

http://windevdesenvolvimento.blogspot.com.br/2017/01/aula-1034-webdev22-010-jquery-explode.html

https://www.youtube.com/watch?v=-z_kfUKoB0c

De matos
21 Feb. 2017
Muda a Cor Background da Lib
// Blog com Video e Exemplo

http://windevdesenvolvimento.blogspot.com.br/2017/01/aula-1036-webdev22-012-jquery-diversos-2.html

https://www.youtube.com/watch?v=xtlnj6Txssg

//Muda a Cor Background da Lib
//Desaparecer Imagen depois de Um tempo
//Aparecer Imagen depois de Um tempo
//Tornar visivel lib_senha
// Percentual de Visibilidade

//Muda a Cor Background da Lib
jQuery(LIB_1).css("background","#c20")

//Desaparecer Imagen depois de Um tempo
jQuery(IMG_Matos).fadeOut("60000000")

//Aparecer Imagen depois de Um tempo
jQuery(IMG_Matos).fadeIn("60000000")

LIB_Senha..Visible=True
//Tornar visivel lib_senha
jQuery(IMG_Matos).fadeTo("slow",0.15)
// Percentual de Visibilidade
De matos
19 Jan. 2017
Muda cor/esconde/delay/mostra/muda texto
// Blog com Video e Exemplo

http://windevdesenvolvimento.blogspot.com.br/2017/01/aula-1035-webdev22-011-jquery-diversos-1.html

http://doc.pcsoft.fr/fr-FR/?1000021070&name=jquery_fonction

//Muda cor/esconde/delay/mostra/muda texto

jQuery(LIB_Texto).css("color","#f666")
//Mudando a Cor do Texto
jQuery(LIB_Texto).hide()
//Escondendo o Texto
jQuery(LIB_Texto).delay("1000")
//Antes de ir para proximo passo vai dar um tempo
jQuery(LIB_Texto).fadeIn("slow")
//Vai mostrar o texto
jQuery(LIB_Texto).text("Mudando a Descrição do Texto")
//Vou Mudar a Descrição do Texto
De matos
19 Jan. 2017
Exemplo Jquery
Bom Dia

// No WebDev 22 , nao precisa baixar jquery , é automatico

// Exemplo: Explode Componente

jQuery(IMG_Matos).effect("explode")


http://windevdesenvolvimento.blogspot.com.br/2017/01/aula-1034-webdev22-010-jquery-explode.html

https://www.youtube.com/watch?v=-z_kfUKoB0c

http://forum.pcsoft.fr/pt-BR/pcsoft.br.windev/2042-aula-1034-webdev22-010-jquery-explode/read.awp

De matos
13 Jan. 2017

Last update: 05/26/2022

Send a report | Local help