包括一个jquery文件似乎覆盖了我的背景

时间:2017-07-22 13:20:44

标签: javascript jquery html css

我有一个名为“registrationpage2”的htm文件,它包含各种链接和脚本,但特别是一行:

<script src="https://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.js"></script>

导致问题。当我包含该行时,我的背景不再可见。当我注释掉该行时,背景再次可见,但是我失去了js文件负责的格式。我尝试移动链接的顺序,但我没有运气,请帮忙。指定背景的文件是“style.css”,如果需要,我可以包括发布代码。

这是我的registrationpag2文件,导致问题的行是标题中的第10个元素:

<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">	
	<title>Registration | Theme 1</title>

	<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>	
	<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js"></script>
        <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.16/jquery-ui.js"></script>

	<script src="registration_v.0.1/theme_1/js/addons.js"></script>

	
	
	<meta name="viewport" content="width=device-width, initial-scale=1">
	<link rel="stylesheet" href="https://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.css">
	<script src="https://code.jquery.com/jquery-1.11.3.min.js"></script>

    <!-- this is the line that causes the issue  -->
	<script src="https://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.js"></script>
	
	<link rel="stylesheet" href="http://campaign.gear.host/registration_v.0.1/theme_1/css/style.css" />
	<link rel="stylesheet" href="http://campaign.gear.host/registration_v.0.1/theme_1/ui/jquery-ui.css" />
</head>
<body>
<div id="main">
	<div id="left_side">
		<div id="container">
			<hgroup>
				<h1>Search</h1>
			</hgroup>
			<article id="article">
				<form class="<form">
					<fieldset>		  		    
						<a href="AdminPage.html" title="Admin Link">Admin</a>
						<div data-role="main" class="ui-content">
							<div data-role="collapsible">
								<h1>Basic Criteria</h1>
								<input><p>First Name</p></input>
								<input><p>Middle Name</p></input>
								<input><p>Last Name</p></input>
								<input><p>Voter Title</p></input>
								<input><p>State Voter ID</p></input>
								<input><p>Registration Date</p></input>
								<input><p>Original Register Date</p></input>
								<input><p>Gender</p></input>
								<input><p>City/Town</p></input>
								<input><p>Country</p></input>
								<input><p>Starting Age Range</p></input>
								<input><p>Ending Age Range</p></input>
								<input><p>Company</p></input>
								<input><p>Preffered Language</p></input>
								<input><p>E-mail Address</p></input>
								<input><p>Phone</p></input>
								<input><p>Phone Location</p>
									<select name="PhoneLocation" id="Phone Location">
										<option value="1">Home</option>
										<option value="3">Main</option>
										<option value="4">Other</option>
										<option value="2">Work</option>
										<option value="5">Billing</option>					  
									</select>
								</input>
								<input><p>Aff Number</p></input>			 
								<input><p>Job Title</p></input>
								<input><p>Contact Source</p></input>
      								<input><p>Select Tag(s)</p></input>
									<td>
									<select name="Select_Tags" id="Select_Tags">		
										<option value="61">Already Voted 3-16-17</option>
										<option value="72">Already Voted 3-29-17</option>
										<option value="60">Canvassed3-15-17</option>
										<option value="62">Canvassed3-16-17</option>
										<option value="68">Chinese HP</option>
										<option value="69">Chinese HP - AV</option>
										<option value="2">Company</option>
										<option value="76">CustomListHP-MinusAV-Age20-40Generic</option>
										<option value="75">CustomListHP-MinusAV-Age20-40Latino</option>
										<option value="77">CustomListHP-MinusAV-Age56-85Generic</option>
										<option value="78">CustomListHP-MinusAV-Age56-85Latino</option>
										<option value="74">CustomListHP-MinusAV-Generic</option>
										<option value="73">CustomListHP-MinusAV-Latino</option>
										<option value="55">DanielList-HighPropensity</option>
										<option value="63">DanielList-HighPropensityMinusAV</option>
										<option value="64">DanielList-HighPropensityMinusAV-Latino</option>
										<option value="59">DanielList-HighPropensityNoPAV</option>
										<option value="58">DanielList-HighPropensityNoPAV-Latino</option>
										<option value="54">DanielList-Independents</option>
										<option value="53">DanielList-Republicans</option>
										<option value="65">DeLaFuente-Custom</option>
										<option value="66">Exculde#2</option>
										<option value="3">Government Entity</option>
										<option value="57">Has GeoCode</option>
										<option value="67">Mailer List</option>
										<option value="4">Major Donor</option>
										<option value="1">Non-profit</option>
										<option value="56">PAVs Last 3 Elections</option>
										<option value="71">PrintPDF-EVEN</option>
										<option value="70">PrintPDF-ODD</option>
										<option value="79">Unique Houshold</option>
										<option value="5">Volunteer</option>
								  	</select></td>
								<input><p>Birth Place</p>
								<input><p>Group(s)</p>
								<input><p>All Tags</p>
								<input><p>Voter ID</p>
								<input><p>Gender*</p>
								<select name="Gender" id="Gender">
									<option>Male</option>
									<option>Female</option>
									<option>Other</option>
									<option>Preffered Not To Ask</option>
								</select>
   							</div>
  						</div>
						      
						<div data-role="main" class="ui-content">
    							<div data-role="collapsible">
								<h2>Location</h2>
								<input><p>City/Town</p></input>
								<input><p>Country</p></input>
								<input><p>Zip Code</p></input>
							</div>
						</div>	
						<div data-role="main" class="ui-content">
    							<div data-role="collapsible">
      							<h3>Situs Info</h3>
							<input><p>Address</p></input>
							<input><p>City</p></input>
							<input><p>Zip</p></input>
							<input><p>House Number</p></input>
							<input><p>Unit Abbreviation</p></input>
							<input><p>Unit NUmber</p></input>
							<input><p>Pre Dir</p></input>
							<input><p>Post Dir</p></input>
							<input><p>Mailing Address 1</p></input>
							<input><p>Mailing Address 2</p></input>
							<input><p>Mailing Address 3</p></input>
							<input><p>Mailing Address 4</p></input>
							<input><p>Mailing Zip</p></input>									
						</div>	
						<div data-role="main" class="ui-content">
     							<div data-role="collapsible">
      								<h4>Voter Area</h4>
								<input><p></p></input>
								<input><p>Precinct Name</p></input>
								<input><p>Precinct ID</p></input>
								<input><p>Precinct Portion</p></input>
								<input><p>District ID 0</p></input>
								<input><p>SubDistrict 0</p></input>
								<input><p>District ID 1</p></input>
								<input><p>SubDistrict ID 1</p></input>
								<input><p>District Name 1</p></input>
								<input><p>SubDistrict ID 1</p></input>
								<input><p>District ID 2</p></input>
								<input><p>SubDistrict 2</p></input>
								<input><p>District Name 2</p></input>
								<input><p>District ID 3</p></input>
								<input><p>SubDistrict 3</p></input>
								<input><p>District Name 3</p></input>
								<input><p>District ID 4</p></input>
								<input><p>SubDistrict 4</p></input>
								<input><p>District Name 4</p></input>
								<input><p>District ID 5</p></input>
								<input><p>SubDistrict 5</p></input>
								<input><p>District Name 5</p></input>
							</div>
						</div>
					</fieldset>
 					
					<fieldset>
  						<div class="item">
  							<div class="submit">
			 				 	<input type="submit" name="submit" value="Search" />
	 						</div>	
						</div>
	 					<div class="item last">
	 						<div class="submit">
	 							<input type="submit" name="submit" value="View Analytics" /> 							
	 						</div>
	 					</div>
					</fieldset>
						
				</form>	
					
			</article>		
		<!---- <aside> ---->
		</div>
	</div>
</div>
</body>
</html>

1 个答案:

答案 0 :(得分:0)

这可能完全错误,但我建议在正文部分的末尾导入我的javascript文件。我认为这样做不会干扰你的HTML。

这可能是你的问题。只需添加javascript文件,如下所示:

                        </article>      
                <!---- <aside> ---->
                </div>
        </div>
</div>
//import here
<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>  
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js"></script>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.16/jquery-ui.js"></script>
<script src="registration_v.0.1/theme_1/js/addons.js"></script>
<script src="https://code.jquery.com/jquery-1.11.3.min.js"></script>
<script src="https://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.js"></script>
</body>

对不起,如果这是错的!!