Click here to Skip to main content
15,919,423 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have a web page and a jquery associated with it.
When i call url using buttons onclick() then the styles applied using jquery is loaded but the same page when called using href then the jquery's document.ready is not loaded and the styles are not applied. I searched a lot but did not found any suitable solution. Same page when refreshed loads properly. please provide me an alternative solution to it. Thanks in advance


JQuery Code
$(document).ready(function() {

			
		$('#select-custom-23-button').removeClass('ui-icon-carat-d ui-btn-icon-right');
		$('#select-custom-23-button').css('background','url(../Pages/Images/selectlist.png) no-repeat');
		$('#select-custom-23-button').css('border','0');
		$('#select-custom-23-button').css('height','10px');
		$('.filterSearchOption .ui-select .ui-btn > span:not(.ui-li-count)').css('display','none');
		$(".search-type").text('Keyword');
							
		
	
});




ASP Code:

<div id="SearchBar">
								<form action="searchList.aspx" method="GET" id="osForm">
									<label class="search-type" style="margin-bottom: -5px;    margin-left: 50px; padding-bottom:2x;padding-top:10px;color:#3388CC ;    width: auto; font-weight:bold;"></label>
									
									<table class="SearchContainer">
										<tbody>
											<tr>
												<td class="filterSearchOption">
													
													<select id="select-custom-23" data-native-menu="false">
														<option></option>
														<option ref="KEY" id="key"><a href="#Key">Keyword</a></option>
														<option ref="CITE">Citation</option>
														<option ref="PARTY"></option>
														<option ref="SECTION"></option>
														<option ref="DOCKETNO"></option>
														<option class="cancel"></option>
										
													</select>
												</td>
												 <td class="search-input">
													<input placeholder="Type your search here" data-clear-btn="true" name="query" id="text1" type="text" />
													<input type="hidden" name="searchCriteria" id="searchCriteria" value="KEY" />
												</td>
												<td class="search-button">
													<input type="image" alt="" class="search-button"/>
												</td>
												
											</tr>
										 </tbody>
								 </table>
							   </form>
							 </div>
Posted
Updated 12-Jun-14 3:06am
v4
Comments
Murali Vijay 12-Jun-14 8:44am    
could you please post your code??
VipinKumar Maurya 12-Jun-14 9:07am    
i want the searchlist to open on submit but the jquery should be loaded on page call

1 solution

Does searchList.aspx include <script src="/path/to/jquery"></script> ?
 
Share this answer
 
Comments
VipinKumar Maurya 13-Jun-14 0:24am    
I did not understand what are you asking for?. And yes Path to jquery is included in the head tag

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900