如何在页面加载时显示隐藏的列表项?

时间:2016-04-01 07:34:53

标签: javascript jquery

我想在pageload上显示我的父$(document).ready(function(){ ('ul:first').show(); });。但我的代码不起作用:



<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<ul style="display:none">
  <li>I am visible</li>
  <ul style="display:none">
    <li>I am not visible</li>
    </ul>
</ul>
&#13;
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:gravity="center"
    android:layout_gravity="center"
    android:orientation="vertical"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:layout_margin="15.0dip"

    <FrameLayout
        android:padding="0.0dip"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_margin="0.0dip">

        <ImageView
            android:id="@+id/wheel"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:src="@drawable/wheel" />

        <ImageView
            android:id="@+id/centre"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:src="@drawable/centre" />

    </FrameLayout>

</LinearLayout>
&#13;
&#13;
&#13;

1 个答案:

答案 0 :(得分:2)

  

选择+(id)createGetConnectionWithName:(NSString*)strConnectionName_ withUrl:(NSString *)pageUrl parameterNames:(NSArray *)arrParamNames parameterValues:(NSArray *)arrParamValues delegate:(id)delegate { NSURL *url=[NSURL URLWithString:[NSString stringWithFormat:@"%@",pageUrl]]; NSMutableString *post =[NSMutableString string]; for(int i=0;i<[arrParamNames count];i++) { if(i==[arrParamNames count]-1) { [post appendFormat:@"%@=%@",[arrParamNames objectAtIndex:i], [arrParamValues objectAtIndex:i]]; } else { [post appendFormat:@"%@=%@&",[arrParamNames objectAtIndex:i], [arrParamValues objectAtIndex:i]]; } } // if(![strConnectionName_ isEqualToString:APP_AUTH_CODE_NAME]) // [post appendFormat:@"&Key=%@",[self getAuthCode]]; NSData *postData = [post dataUsingEncoding:NSASCIIStringEncoding allowLossyConversion:YES]; NSString *postLength = [NSString stringWithFormat:@"%lu", (unsigned long)[postData length]]; NSMutableURLRequest *request = [[NSMutableURLRequest alloc] init]; [request setURL:url]; [request setHTTPMethod:@"POST"]; [request setValue:postLength forHTTPHeaderField:@"Content-Length"]; [request setValue:@"application/x-www-form-urlencoded" forHTTPHeaderField:@"Content-Type"]; [request setHTTPBody:postData]; // conn =[[NSURLConnection alloc] initWithRequest:request delegate:self] ; return [[self alloc] initWithRequest:request delegate:delegate]; }

时,您遗漏了Process.Start

&#13;
&#13;
$
&#13;
element
&#13;
&#13;
&#13;