ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

This content has been translated automatically.  Click here  to view the French version.
Help / WLanguage / WLanguage functions / Web-specific functions / Miscellaneous WEBDEV functions
  • Parameters of jQuery function
  • Loading the jQuery library and its extensions
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
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, requiring a good knowledge of Javascript and the jQuery library.
Example
// Utilisation d'une seule fonction jQuery 
jQuery(LIB_1).fadeOut()
// Utilisation avec 2 fonctions chaînées
// L'opacité du champ est modifiée, puis il explose en morceaux avant de disparaître
jQuery(CELL_Carré).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.
Note: The "The control can be overlaid" option must be checked for the field ("UI" tab in the control description window)..
<jQuery function>: Character string
Name of jQuery function to run.
Caution: Javascript is case sensitive, so the function name must be case sensitive as 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. Please note: Javascript is case sensitive, so 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. Please note: Javascript is case sensitive, so 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_Ajout).ON("click", &OnAjout)

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: Include 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.
Warning: Check the order of script dependencies (the jQuery library, then its extensions).
Method 2: Add script insertion markup:
  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 wish 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: 03/28/2025

Send a report | Local help