Let's take a look at below example.
Function and Global Variable Declaration
- $(function(){
- $('#P50_CLICK_DISPLAY').on('click', function(){
- $("#P50_HIDE").hide();
- $("#P50_SHOW").show();
- $("#P50_HIDE_LABEL").hide();
- $("#P50_SHOW_LABEL").show();
- })
- })
Three items in same region(Static). here P50_CLICK_DISPLAY is a display only item and it's value is static. There are two more item which is Hide and Show.
Now, initially p50_show will be hidden on page load and p50_hide will be displayed.When user clicks on display only item's value then p50_show will be displayed and p50_hide will be hidden.
Execute when Page Loads
- $("#P50_SHOW").hide();
- $("#P50_SHOW_LABEL").hide();
Here we have hide the Label as well as item.
This can be done without using DA which is more convenient way in this scenario.
Css:
- #P50_CLICK_DISPLAY {
- text-decoration: underline;
- -webkit-text-decoration-color: red;
- -moz-text-decoration-color: red; /* vendor prefix not required as of V36 */
- color: red;
- }
If you want to redirect you can use :
$('#P50_CLICK_DISPLAY').wrap('<a href="Link_url"></a>') ;
Page : 50
Credentials : test/test
No comments:
Post a Comment