This repository has been archived by the owner on Apr 8, 2019. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make gatein-jquery example portlet work with requirejs
- Loading branch information
Showing
4 changed files
with
25 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 12 additions & 12 deletions
24
examples/portlets/jquery/src/main/webapp/javascript/version.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,15 @@ | ||
$(".version").remove(); | ||
|
||
$("#portletJQuery").click(function() | ||
{ | ||
var target = $(this); | ||
$('#result').append("<p>The JQuery's version: " + $().jquery + "</p>"); | ||
$('#result').children('p').fadeOut(3200); | ||
$(function() { | ||
$("#portletJQuery").click(function() { | ||
$('#result').append("<p>The JQuery's version: " + $().jquery + "</p>"); | ||
$('#result').children('p').fadeOut(3200); | ||
}); | ||
}); | ||
|
||
$("#gateinJQuery").click(function() | ||
require(["SHARED/jquery"], function($) | ||
{ | ||
var target = $(this); | ||
gj('#result').append("<p>The JQuery's version: " + gj().jquery + "</p>"); | ||
gj('#result').children('p').fadeOut(3200); | ||
}); | ||
$("#gateinJQuery").click(function() | ||
{ | ||
$('#result').append("<p>The JQuery's version: " + $().jquery + "</p>"); | ||
$('#result').children('p').fadeOut(3200); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters