Hi Jake,
I really appreciate your help. I still don't have any luck on this. I have tried jQuery event delegation too, but its still not executing the script. I have posted my complete code below.
<style>
#search .SearchForm {
visibility: visible !important;
}
.lia-button-searchForm-action{
visibility: hidden;
}
.lia-search-input-message{
padding: 0px 0px 0px 10px !important;
border-radius: 5px !important;
}
.lia-component-common-widget-search-form .lia-search-input-wrapper .search-input{
height: 40px !important;
}
.lia-component-common-widget-search-form{
padding: 0px !important;
}
</style>
<script>
$(document).ready(function(){
$('[name="messageSearchField"]').attr('placeholder','Enter a Subject');
});
</script>
<div id="search">
<table style="width:100%">
<tbody>
<tr>
<td width="10%"><label class="required" id="ot_subject">Subject:</label></td>
<td><label id="subjectErrorMessage" style="color:red" hidden="true">Subject cannot be blank</label></td>
</tr>
</tbody>
</table>
<@component id="common.widget.search-form" hideGranularity="true" defaultToCommunity="false"/>
</div>
<@liaAddScript>
;(function($){
$(document).on('click', 'a.lia-link-navigation.lia-js-autocomplete-list-item-link.lia-autocomplete-message-list-item-link.lia-component-forums-auto-complete-message-list-item', function(event){
event.preventDefault();
console.log("This worked!");
window.open($(this).attr('href'), '_blank');
});
})(LITHIUM.jQuery);
</@liaAddScript>I have created a custom search suggestion component using Standard Search form and consuming the same in other pages.
Please let me know if i have done something wrong with this code.
Thanks