PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • 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/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
jQuery (Function)
In French: jQuery
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(<Name of WEBDEV Control>).<jQuery Function>(<Parameter 1>, ..., <Parameter N>)
<Result>: Expected type
Return value of jQuery method called.
<Name of WEBDEV Control>: Character string (with or without quotes)
Name of control that will be used in the page.
Note: The option "The control can be overlaid" must be checked for the control ("GUI" tab in the description window of the control).
<jQuery Function>: Character string (without quotes)
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(<Name of 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.
<Name of WEBDEV Control>: Character string (with or without quotes)
Name of control that will be used in the page.
<jQuery Function 1>: Character string (without quotes)
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 (also called "Callback") must be passed in to one of the jQuery functions, the browser procedure must be passed by address (name of the function preceded by "&"). For example:
jQuery(BTN_Add).on("click", &OnAddition)

Loading the jQuery library and its extensions

A jQuery library is supplied 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" from the popup 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" from the popup menu).
  2. Select the "Advanced" tab.
  3. Select the "HTML" tab.
  4. Copy the following code lines 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 is using 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.
Components
WEBDEV - Browser code WDJS.DLL
Minimum required version
  • 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
Feb. 21 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
Jan. 19 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
Jan. 19 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
Jan. 13 2017