Search Results

Search found 135 results on 6 pages for 'navbar'.

Page 5/6 | < Previous Page | 1 2 3 4 5 6  | Next Page >

  • Does preloading content from a page skew my google analytics stats?

    - by user278457
    I'd like to write myself a simple script that uses AJAX to load the content from each page on my main navbar into a hidden div on the current page. This is just so that I can preload as much of my important content as possible and get it cached on the user's computer (hopefully) before they've finished with the current page and want to move on. I'm concerned that doing a request for every page on the site, every time someone visits, will really ruin the validity of my google analytics stats. How does AJAX interact with google analytics? Does it count as a "page visit"?

    Read the article

  • One of my IFrames not displaying.

    - by user323186
    Im writing a page consisting of a navigation bar which when ckicked will open other pages in an IFrame below. Its working in general, but one of my Iframes doesnt display. I cannot for the life of me explain why. If you can see why please tell me. Its the google button that doesnt work. Please find my website in the zip archive: http://www.datafilehost.com/download-a9f59084.html The page to view to test is: /Navbar/homeDiv2.html Any suggestions appreciated. Thanks

    Read the article

  • What would be jQuery equivalent of this sf hover suckerfish code?

    - by metal-gear-solid
    What would be jQuery equivalent of this sf hover suckerfish code? <script> sfHover = function() { var sfEls = document.getElementById("navbar").getElementsByTagName("li"); for (var i=0; i<sfEls.length; i++) { sfEls[i].onmouseover=function() { this.className+=" hover"; } sfEls[i].onmouseout=function() { this.className=this.className.replace(new RegExp(" hover\\b"), ""); } } } if (window.attachEvent) window.attachEvent("onload", sfHover); </script>

    Read the article

  • iPhone xcode - Best way to control audio from several view controllers

    - by Are Refsdal
    Hi, I am pretty new to iPhone programming. I have a navBar with three views. I need to control audio from all of the views. I only want one audio stream to play at a time. I was thinking that it would be smart to let my AppDelegate have an instance of my audioplaying class and let the three other views use that instance to control the audio. My problem is that I don´t know how my views can use the audioplaying class in my AppDelegate. Is this the best approach and if so, how? Is there a better way?

    Read the article

  • Want to open Shadowbox gallery directly through Wordpress Navigation Menu

    - by Kevin A.
    I want to be able to open my shadowbox gallery in wordpress by directly clicking the portfolio link in the navbar. Right now it either opens the portfolio page I made with the gallery in it or opens images separately (without shadowbox), this was because I tried adding html to the Nav Label in the wordpress dashboard. Basically want to be able to add this html to the link in the menu dashboard while having the one PORTFOLIO link: <a href="/portfolio_images/fashion/01.jpg" rel="shadowbox[fashion]"> <a href="/portfolio_images/fashion/02.jpg" rel="shadowbox[fashion]"> <a href="/portfolio_images/fashion/03.jpg" rel="shadowbox[fashion]"> Thanks Main page with nav links

    Read the article

  • Weird "?>" being displayed

    - by Jaxkr
    I have the following navigation bar script: <?php session_start(); require('includepath.inc.php'); require($include_path.'loginsysfunc.inc.php'); $current_page = $_SERVER['REQUEST_URI']; ?> <div class="navbar"> <img class="navlogo" src="logo.png"> <div class="navbutton"><a href="index.php">Home</a></div> <div class="navbutton"><a href="about.php">About</a></div> <div class="navbutton"><a href="donate.php">Donate</a></div> <?php if (loggedIn()){ ?> <div class="navusername"><a href="profile.php?user=<?php echo $_SESSION['username'];?>"><?php echo $_SESSION['username']; ?></a></div> <div class="navtoolsettings"><a href="settings.php">Settings</a></div> <div class="navtoollogout"><a href="logout.php">Log out</a> <?php } elseif ($current_page == '/login.php') { ?> <div class="navregister"><a href="register.php">Register</a></div> <?php } else { ?> <div class="navusername"><a href="login.php">Log in</a></div> <?php } ?> </div> For some reason, a strange "?" is being displayed. I am super confused, so please help. Here is includepath.inc.php (the only I reason it's there is because I am on a shared host, and I don't want to type '/home/bigdumbhash/public_html/include' everytime. But, here it is: <?php $include_path = '/home/a6595899/public_html/include/'; ?> Here is loginsysfunc.inc.php. These are functions that go with my login system to save time: <?php function valUser() { session_regenerate_id(); $_SESSION['valid'] = true; $_SESSION['username'] = $userid; echo '<meta http-equiv="refresh" content="0;URL=\'index.php\'">'; } function loggedIn() { if($_SESSION['valid'] == true) { return true; } else { return false; } } function createSalt() { $string = $string = md5(uniqid(rand(), true)); return substr($string, 0, 3); } function logout() { $_SESSION = array(); session_destroy(); echo '<meta http-equiv="refresh" content="0;URL=\'index.php\'">'; } ?> Here is the actual HTML of the page: <!DOCTYPE html> <html> <head> <link href="style.css" rel="stylesheet" type="text/css"> <title> Log in </title> </head> <body> <div class="navbar"> <img class="navlogo" src="logo.png"> <div class="navbutton"><a href="index.php">Home</a></div> <div class="navbutton"><a href="about.php">About</a></div> <div class="navbutton"><a href="donate.php">Donate</a></div> <div class="navregister"><a href="register.php">Register</a></div> </div> ?> <div class="loginbox"> <h1>Log in</h1> <form action="logingo.php" method="POST"> <input class="userpass" type="text" name="username" value="Username" onFocus="this.value='';"> <br> <input class="userpass" type="password" name="password" value="Password" onFocus="this.value='';"> <br> <input class="loginbutton" type="submit" value="Log in!"> </form> </div> </body> </html>

    Read the article

  • iphone presentModalViewController

    - by sandy
    Hi All, I have an app, inside that an UIViewController is attached on the UIWindow. on the view of UIViewController, i have added a button and a uiview_1 of size 100x80. this uiview_1 contains another uiview_2 as subview of same size and this uiview_2 contains a UIImageView or a UIlable at runtime (both UIImageView and UIlable are userinteraction enabled) now on the touch/click of UIImageView, i want to show a new view using presentModalViewController, the problem is the view is shown and using back button on the navigation bar i come to the previous/main screen. here the problem come in picture, now i am unable to touch the button or the UIImageView. both are not responding, but app is not crashed and nor frozen. what is wrong in that? Plz help in this... ----- EDIT: Approach First: SWVController *swvController = [[SWVController alloc] init]; UINavigationController *viewNavController = [[UINavigationController alloc] initWithRootViewController:swvController]; UIViewController *pushController = [[UIViewController alloc] init]; UIWindow *win = [[UIApplication sharedApplication] keyWindow]; [win addSubview:pushController.view]; [pushController presentModalViewController:viewNavController animated:YES]; In the swvController i have back button that calls the dismissModelViewController on click result is the Main screen ctrls are not responding to touch – sandy 3 hours ago Second approach: SWVController *swvController = [[SWVController alloc] init]; UINavigationController *viewNavController = [[UINavigationController alloc] initWithRootViewController:swvController]; UIViewController *pushController = [[UIViewController alloc] init]; [self addSubview:pushController.view]; [pushController presentModalViewController:viewNavController animated:YES]; In the swvController i have back button that calls the dismissModelViewController on click result is the swvController's back button on navbar is not responding – sandy 3 hours ago 3rd approach: SWVController *swvController = [[SWVController alloc] init]; UINavigationController *viewNavController = [[UINavigationController alloc] initWithRootViewController:swvController]; SampleAppAppDelegate *appdel = [[UIApplication sharedApplication] delegate]; [appdel.viewController presentModalViewController:viewNavController animated:YES]; result is working fine, but the problem is i dont want to use SampleAppAppDelegate,i want to give my small Uiview (100x80) as a ctrl to other person , where my ctrl will not able to get the AppDelegate of thet app at run time. – sandy 3 hours ago

    Read the article

  • Positioning Layers and text gradients with css

    - by Kenji Crosland
    I'm a CSS newbie trying to get some text gradients going on. I tried this code here but it didn't work for me, most likely because the h1 object is nested within a #header div. I imagine there's something to do with layers that I don't know about. Either I get a gradent block that is in front of everything or it's not appearing at all. In this particular instance this code makes a big gradient bar appear in front of everything: #header { clear:both; float:left; -moz-background-inline-policy:continuous; -moz-background-origin:padding; background:#080E73 url(../images/header-background.png) repeat-x left 0px; width:100%; max-height: 175px; color: #080E73; } #header h1 { margin-bottom: 0; color: #000; position: relative; } #header h1 span { background:url(../images/headline-text.png) repeat-x; display: block; width: 100%; height: 100%; position: absolute; } Here is the HTML (I'm using ruby on rails hence the notation) <div id="header"> <% unless flash[:notice].blank? %> <div id="notice"><%= flash[:notice] %></div> <% end %> <%= image_tag ("header-image.png") %> <h1><span></span>Headline</h1> <strong>Byline</strong> ... #navbar html... </div> I tried playing with z-index but I couldn't come up with any good results. Any ideas?

    Read the article

  • jQuery hover menu not disappearing

    - by Nathan Loding
    I have a basic menu using some nested UL's, which is pretty standard I think. When hovering over an LI from the "root" menu, I want the UL within that LI to display. Move the mouse off or to another LI, it shows that submenu. Move down to the submenu and it stays while you hover over each element. I had it working with a simple jQuery.hover() set, but then I ran into issues. When on a page, the "root" menu item is given a class of 'current-page' and if that class exists, I want it to display that submenu statically after a mouseout. Hope I explained that well enough. I just tossed a variable into the hover functions so on the mouseout it ran a .show() on the current-page's submenu. Easy. Except that when I move the mouse between the individual LI's of the submenu, it changes back to the current-page submenu. So I attempted to add a timer element based on another question here. That made things worse -- now the submenus just don't disappear. Here's my CSS, markup, and JS ... how the heck do I make this work properly? Markup: <div id="menu"> <div id="navbar"> <ul id="firstmenu"> <li> <a href="http://localhost/site/pageone">page one</a> <ul class="submenu"> <li><a href="http://localhost/site/pageone/subone">subone</a></li> <li><a href="http://localhost/site/pageone/subtwo">subtwo</a></li> <li><a href="http://localhost/site/pageone/subthree">subthree</a></li> <li><a href="http://localhost/site/pageone/subfour">subfour</a></li> <li><a href="http://localhost/site/pageone/subfive">subfive</a></li> </ul> </li> <li> <a href="http://localhost/site/pagetwo">barely there</a> <ul class="submenu"> <li><a href="http://localhost/site/pageone/subone">subone</a></li> <li><a href="http://localhost/site/pageone/subtwo">subtwo</a></li> <li><a href="http://localhost/site/pageone/subthree">subthree</a></li> <li><a href="http://localhost/site/pageone/subfour">subfour</a></li> <li><a href="http://localhost/site/pageone/subfive">subfive</a></li> </ul> </li> <li class="current-page"> <a href="http://localhost/site/pagetwo">kith & kin</a> <ul class="submenu"> <li><a href="http://localhost/site/pageone/subone">subone</a></li> <li><a href="http://localhost/site/pageone/subtwo">subtwo</a></li> <li><a href="http://localhost/site/pageone/subthree">subthree</a></li> <li><a href="http://localhost/site/pageone/subfour">subfour</a></li> <li><a href="http://localhost/site/pageone/subfive">subfive</a></li> </ul> </li> <li> <a href="http://localhost/site/pagethree">focal point</a> <ul class="submenu"> <li><a href="http://localhost/site/pageone/subone">subone</a></li> <li><a href="http://localhost/site/pageone/subtwo">subtwo</a></li> <li><a href="http://localhost/site/pageone/subthree">subthree</a></li> <li><a href="http://localhost/site/pageone/subfour">subfour</a></li> <li><a href="http://localhost/site/pageone/subfive">subfive</a></li> </ul> </li> <li> <a href="http://localhost/site/pagefour">products</a> <ul class="submenu"> <li><a href="http://localhost/site/pageone/subone">subone</a></li> <li><a href="http://localhost/site/pageone/subtwo">subtwo</a></li> <li><a href="http://localhost/site/pageone/subthree">subthree</a></li> <li><a href="http://localhost/site/pageone/subfour">subfour</a></li> <li><a href="http://localhost/site/pageone/subfive">subfive</a></li> </ul> </li> <li> <a href="http://localhost/site/pagefive">clients</a> </li> </ul> </div></div> And here's the CSS: #navbar { margin: 0; padding: 0; border: 0; text-align: center; } #firstmenu { margin: 6px auto 0 auto; font-size: 16px; list-style-type: none; letter-spacing: -1px; } #firstmenu li { display: inline; position:relative; overflow: hidden; text-align: center; margin-right: 10px; padding: 5px 15px; } #firstmenu a { text-decoration: none; outline: none; color: black; font-weight: 700; width: 75px; cursor: pointer; } .current-page { color: white; background: url(../images/down_arrow.png) bottom center no-repeat; } .current-page a { color: white; border-bottom: 1px solid black; } #firstmenu .current-page a { color: white; } #firstmenu li.hover { color: white; background: url(../images/down_arrow.png) bottom center no-repeat; } #firstmenu li.hover a { color: white; border-bottom: 1px solid black; } #firstmenu li ul li.hover { color: white; background: none; } #firstmenu li ul li.hover a { color: white; border-bottom: none; text-decoration: underline; } #firstmenu li ul { width: 900px; color: white; font-size: .8em; margin-top: 3px; padding: 5px; position: absolute; display: none; } #firstmenu li ul li { list-style: none; display: inline; width: auto; } #firstmenu li ul li a { color: white; font-weight: normal; border: none; } .sub-current-page { font-weight: bold; text-decoration: underline; } #firstmenu li ul li.sub-current-page a { font-weight: bold; } And lastly, my not-at-all-working JS (this is in a $(document).ready(), of course): // Initialize some variables var hideSubmenuTimer = null; var current_page; $('.current-page ul:first').show(); // Prep the menu $('#firstmenu li').hover(function() { // Clear the timeout if it exists if(hideSubmenuTimer) { clearTimeout(hideSubmenuTimer); } // Check if there's a current-page class set if($('li.current-page').length > 0) { current_page = $('li.current-page'); } else { current_page = false; } // If there's a current-page class, hide it if(current_page) { current_page.children('ul:first').hide(); } // Show the new submenu $(this).addClass('hover').children('ul:first').show(); }, function(){ // Just in case var self = this; // Clear the timeout if it exists if(hideSubmenuTimer) { clearTimeout(hideSubmenuTimer); } // Check if there's a current-page class set if($('li.current-page').length > 0) { current_page = $('li.current-page'); } else { current_page = false; } // Set a timeout on hiding the submenu hideSubmenuTimer = setTimeout(function() { // Hide the old submenu $(self).removeClass('hover').children('ul').hide(); // If there's a current-page class, show it if(current_page) { current_page.children('ul:first').show(); current_page.css('color', 'white'); } }, 500); }); So what am I doing so wrong? As a side note, I'm using the $('.current-page ul:first').show() because if I gave .current-page any "display" setting in the CSS, it positioned it really weirdly on the page.

    Read the article

  • Why does navigationItem.titleView align left when presentmodalviewcontroller called?

    - by jm333
    I'm using a UILabel for the titleView of a navigation bar (I'm making simple in-app web browser). It works fine, except that when I present a modal view controller, the titleView shifts from the center of the navbar to the far left (underneath the back button). I've tested in 3.0 and up. Here is relevant code: - (void)viewDidLoad { [super viewDidLoad]; // Title view label CGRect labelFrame = CGRectMake(0.0, 0.0, 120.0, 36.0); UILabel *label = [[[UILabel alloc] initWithFrame:labelFrame] autorelease]; label.font = [UIFont boldSystemFontOfSize:14]; label.numberOfLines = 2; label.backgroundColor = [UIColor clearColor]; label.textAlignment = UITextAlignmentCenter; label.textColor = [UIColor whiteColor]; label.shadowColor = [UIColor blackColor]; label.shadowOffset = CGSizeMake(0.0, -1.0); label.lineBreakMode = UILineBreakModeMiddleTruncation; self.navigationItem.titleView = label; } -(void)displayComposerSheet:(NSString*)mailto { MFMailComposeViewController *picker = [[MFMailComposeViewController alloc] init]; picker.mailComposeDelegate = self; [self presentModalViewController:picker animated:YES]; [picker release]; } Screenshots: http://img689.imageshack.us/img689/7968/titleviewshift.jpg Any idea why this is happening? Thanks.

    Read the article

  • Problem linking and printing in parent iframe

    - by Mikersson
    I have a page with 3 iframes: Header, Pictures, and footer: The look U can see it here: http://www.pixelperu.net/iframe/iframe.jpg/iframe <script Language="javascript"> function printfile() { window.frames['pictures'].focus(); window.frames['pictures'].print(); } </script> | </head> <body> <div id="wrapper"> <div id="header"> <iframe id="header" src="header.html" ></iframe> </div> <div id="content"> <iframe id="pictures" src="arm001.html" Scrolling="no"> </iframe> </div> <div id="footer"><iframe id="footer" src="footer.html" > </iframe></div> </div> </body> </html> The header iframe have next code: </head> <body> <div id="header"> <div class="navBar">First Page | Next page | Back page | Last page | <p><input type="button" value="Print" onclick="javascript: printfile();"></p></div> </body> When I click on "Next Page" the content should be showed in "pictures" iframe. Also when I wanna print, it should print the "Pictures iframe" Where shuld I put the JavaScritp? in the index page? or in the header page? Thank you

    Read the article

  • iOS iPad UIActionSheet Issue

    - by hart1994
    I am currently developing an application which needs an option to 'share' using multiple services; such as email, twitter. To to this, I have a UIBarButtonItem coded in and when touched, it triggers this: UIActionSheet *sheet = [[UIActionSheet alloc] initWithTitle:@"" delegate:self cancelButtonTitle:nil destructiveButtonTitle:nil otherButtonTitles:nil]; [sheet addButtonWithTitle:@"Email"]; [sheet addButtonWithTitle:@"Tweet"]; [sheet addButtonWithTitle:@"Cancel"]; sheet.cancelButtonIndex = sheet.numberOfButtons-1; [sheet showFromRect:self.view.bounds inView:self.view animated:YES]; [sheet release]; In conjunction with this to detect which button is selected: clickedButtonAtIndex:(NSInteger)buttonIndex { if (buttonIndex == actionSheet.cancelButtonIndex) { return; } switch (buttonIndex) { case 0: { [self emailThis]; break; } case 1: { [self tweetThis]; break; } } This works a treat on the iPhone. But unfortunately it displays incorrectly on the iPad. It looks like it is trying to display the UIPopoverController, but it is positioned center of the navbar with practically no height. I have looked into using the UIPopoverController, but I cannot seem to find out how to use it with buttons. Is there anyway I can adapt the code above to properly display the buttons, as it's trying to already. Many thanks, Ryan PS: I'm new to objective-c/iOS coding, so please be specific. Thank you :)

    Read the article

  • pushViewController Not Displaying UIView/Nib with tabbar and nav bar

    - by james
    I'm relatively new to objective c but not programming and am stuck with my iphone app. I created a nav based app with both a navbar and a tab bar controller. I set the tab bar as the root controller. I'm able to switch between each tab without any issues to various UIViews and UITableViews. My issue is that in one of my UITableViews that I call from the TabBarController, didSelectRowAtIndexPath function is suppose to display a new UIView. The below code does not give any errors and runs fine but does not show the new Nib. if(newViewController == nil) { NSLog(@"yes nil"); BookViewController *aNewViewController = [[BookViewController alloc] initWithNibName:@"BookOptionView" bundle:nil]; self.newViewController = aNewViewController; [aNewViewController release]; } BookAppDelegate *delegate = (BookAppDelegate *)[[UIApplication sharedApplication] delegate]; [delegate.appNavBar pushViewController:newViewController animated:YES]; Now when I do the below, it works fine but it gets rid of the nav and tab which I'm assuming because its a modal call instead of pushing the view controller. BookViewController *screen = [[BookViewController alloc] initWithNibName:@"BookOptionView" bundle:[NSBundle mainBundle]]; screen.modalTransitionStyle = UIModalTransitionStyleCoverVertical; [self presentModalViewController:screen animated:YES]; [screen release]; Any ideas why I can't get the View Controller to push correctly? In my application delegate file, I declared an AppNavBarController object (inherit from UINavigationController) called appNavBar. Any help would be appreciated!

    Read the article

  • add button to navigationbar programatically

    - by mac
    Hi i need to set the button on right side, in navigation bar, programatically , so that if i press the button i will perform some actions, i have created the navigation bar,programatically by navBar=[[UINavigationBar alloc]initWithFrame:CGRectMake(0,0,320,44) ]; similarly i need to add the button , right side of this navigation bar,for that i used, 1) UIView* container = [[UIView alloc] init]; // create a button and add it to the container UIButton* button = [[UIButton alloc] initWithFrame:CGRectMake(0, 0, 130, 44.01)]; [container addSubview:button]; [button release]; // add another button button = [[UIButton alloc] initWithFrame:CGRectMake(160, 0, 50, 44.01)]; [container addSubview:button]; [button release]; // now create a Bar button item UIBarButtonItem* item = [[UIBarButtonItem alloc] initWithCustomView:container]; // set the nav bar's right button item self.navigationItem.rightBarButtonItem = item; [item release]; 2) UIImage *im; im=[UIImage imageNamed:@"back.png"]; [button setImage:im forState:UIControlStateNormal]; [im release]; backButton = [[UIBarButtonItem alloc] initWithCustomView:button]; [backButton setImageInsets:UIEdgeInsetsMake(0, -10,5, 5)]; [self.navigationItem setRightBarButtonItem:backButton]; 3) UIBarButtonItem *refreshItem = [[UIBarButtonItem alloc] initWithTitle:@"button" style:UIBarButtonItemStylePlain target:self action:@selector(refreshLogsAction:)]; self.navigationItem.rightBarButtonItem = refreshItem; [refreshItem release]; i tried all these type of codings , no use, these codes are not displaying the button at rigth side,please help me. thanks in advance,

    Read the article

  • jquery slide to attribute with specific data attribute value

    - by Alex M
    Ok, so I have the following nav with absolute urls: <ul class="nav navbar-nav" id="main-menu"> <li class="first active"><a href="http://example.com/" title="Home">Home</a></li> <li><a href="http://example.com/about.html" title="About">About</a></li> <li><a href="http://example.com/portfolio.html" title="Portfolio">Portfolio</a></li> <li class="last"><a href="example.com/contact.html" title="Contact">Contact</a></li> </ul> and then articles with the following data attributes: <article class="row page" id="about" data-url="http://example.com/about.html"> <div class="one"> </div> <div class="two" </div> </article> and when you click the link in the menu I would like to ignore the fact it is a hyperlink and slide to the current article based on its attribute data-url. I started with what I think is the obvious: $('#main-menu li a').on('click', function(event) { event.preventDefault(); var pageUrl = $(this).attr('href'); )}; and have tried find and animate but then I don't know how to reference the article with data-url="http://example.com/about.html". Any help would be most appreciated. Thanks

    Read the article

  • Custom view transition in OpenGL ES

    - by melfar
    I'm trying to create a custom transition, to serve as a replacement for a default transition you would get here, for example: [self.navigationController pushViewController:someController animated:YES]; I have prepared an OpenGL-based view that performs an effect on some static texture mapped to a plane (let's say it's a copy of the flip effect in Core Animation). What I don't know how to do is: grab current view content and make a texture out of it (I remember seeing a function that does just that, but can't find it) how to do the same for the view that is currently offscreen and is going to replace current view are there some APIs I can hook to in order to make my transition class as native as possible (make it a kind of Core Animation effect)? Any thoughts or links are greatly appreciated! UPDATE Jeffrey Forbes's answer works great as a solution to capture the content of a view. What I haven't figured out yet is how to capture the content of the view I want to transition to, which should be invisible until the transition is done. Also, which method should I use to present the OpenGL view? For demonstration purposes I used pushViewController. That affects the navbar, though, which I actually want to go one item back, with animation, check this vid for explanation: http://vimeo.com/4649397. Another option would be to go with presentViewController, but that shows fullscreen. Do you think maybe creating another window (or view?) could be useful?

    Read the article

  • Table Row Spacing Problem in IE

    - by Brij
    Viewing the code below in IE displays spacing between the rows. I want to join the rows. In Firefox, It is working fine. <table border="0" cellspacing='0' cellpadding='0' width="720" cols="2"> <tr> <td colspan="2"> <a href="index.html"> <img src="images/banner.gif" border="0"> </a> </td> </tr> <tr valign="top"> <td width="130"> <img name="navigate" src="images/navbar.jpg" border="0"> </td> ..... I have also tried style="margin:0; padding:0;" for tr and td but there is no effect in IE. Let me know what to do to remove spacing between rows. Thanks

    Read the article

  • #nav css affecting all elements in page.

    - by Sam Gabriel
    Hey guys I set up this CSS file to use on the navbar: #nav { background-color: #98bf21; } #nav li { float:left; } #nav li ul{ position: absolute; width: 172px; left: -999em; } #nav li:hover ul{ left: auto; } #nav a:link,a:visited { display:block; width:164px; font-weight:bold; color:white; background-color:#98bf21; text-align:center; padding:4px; text-decoration:none; text-transform:uppercase; } #nav a:hover,a:active { background-color: #7A991A; } And it seems to be affecting all the elements. For example all elements take the styles if the #nav a styles. Is there something I'm missing here? I'm new to web design.

    Read the article

  • IPhone - Memory Management problems.

    - by user321721
    i am going over my code and trying to get a handle on proper memory management. This code: imageView = [[[UIImageView alloc] initWithImage:myImage] autorelease]; causes my application to crash. I am using multiple view controllers within a nav bar controller. The app works fine, i cant select a person from the first view controller (tableview) and it puts me to a list of that persons photos, i can then select a photo from that view controller (tableview) and move to a final view with a scrollview for viewing the photo. Once i hit back on the navbar the previous view loads (list of photos in a tableview) however the app crashes right before the row is deselected using this code: (void)viewDidAppear:(BOOL)animated { [super viewDidAppear:animated]; if(RowSelected != nil) { [MainTableView deselectRowAtIndexPath:RowSelected animated:YES]; } } Row selected is stored when a the user clicks a row. If i leave the code as : imageView = [[UIImageView alloc] initWithImage:myImage]; The app runs fine. Am i doing something wrong? do i not need to autorelease this? Thanks!

    Read the article

  • How do I pass an NSString through 3 ViewControllers?

    - by dBloc
    hey, I'm currently using the iPhone SDK and I'm having trouble passing an NSString through 3 views I am able to pass an NSString between 2 view controllers but I am unable to pass it through another one. My code is as follows... `- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)index`Path { NSString *string1 = nil; NSDictionary *dictionary = [listOfItems objectAtIndex:indexPath.section]; NSArray *array = [dictionary objectForKey:@"items"]; string1 = [array objectAtIndex:indexPath.row]; //Initialize the detail view controller and display it. ViewController2 *vc2 = [[ViewController2 alloc] initWithNibName:@"ViewController2" bundle:[NSBundle mainBundle]]; vc2.string1 = string1; [self.navigationController pushViewController:vc2 animated:YES]; [vc2 release]; vc2 = nil; } in the "ViewController 2" implementations I am able use "string1" in the title bar by doing the following.... - (void)viewDidLoad { [super viewDidLoad]; self.navigationItem.title = string1; UIBarButtonItem *addButton = [[[UIBarButtonItem alloc] initWithImage:[UIImage imageNamed:@"icon_time.png"] style:UIBarButtonItemStylePlain //style:UIBarButtonItemStyleBordered target:self action:@selector(goToThirdView)] autorelease]; self.navigationItem.rightBarButtonItem = addButton; } but I also have a NavBar Button on the right side that I would like to push a new view - (void)goToThirdView { ViewController3 *vc3 = [[ViewController3 alloc] initWithNibName:@"ViewController3" bundle:[NSBundle mainBundle]]; [self.navigationController pushViewController:NESW animated:YES]; vc3.string1 = string1 ; [vc3 release]; vc3 = nil; } How do I pass on that same string to the third view? (or fourth)

    Read the article

  • UIButton addTarget method can not use in IOS 4.2

    - by Risma
    hi i have a UIButton made programmatically and i want to add the target and the action for that button. i have use method addTarget: action: forControlEvents: in IOS 4.1 this method is detected, but in 4.2 it didn't, here is my code float version = [[[UIDevice currentDevice] systemVersion] floatValue]; if(version <= 4.1){ moreButton = [[UIButton buttonWithType:UIButtonTypeCustom] initWithFrame:CGRectMake(6.3+5*widthSegment, 0.0, widthSegment, heightSegment)]; [moreButton addTarget:self action:@selector(getPopOverMore:) forControlEvents:UIControlEventTouchUpInside]; } else{ //version 4.2 NSLog(@"versi 4.2"); moreButton = [UIButton buttonWithType:UIButtonTypeCustom]; moreButton.frame = CGRectMake(6.3+7*widthSegment, 0.0, widthSegment, heightSegment); [moreButton addTarget:self action:@selector(getPopOverMore:) forControlEvents:UIControlEventTouchUpInside]; } and this is the action method : - (IBAction)getPopOverMore:(id)sender{ if(moreFileController == nil) { moreFileController = [[MoreFilePopController alloc] initWithStyle:UITableViewStylePlain]; moreFileController.delegate = self; moreFilePopOverController = [[UIPopoverController alloc] initWithContentViewController:moreFileController]; } CGRect frameMore = CGRectMake(6.3+5*widthSegment, 0.0, widthSegment, heightSegment); [moreFilePopOverController presentPopoverFromRect:frameMore inView:navBar permittedArrowDirections:UIPopoverArrowDirectionUp animated:YES]; } any body know, what's wrong here??

    Read the article

  • Margin-Top push outer div down

    - by Daniel Hertz
    Hello, I have a header div as the first element in my wrapper div, but when I add a top margin to a h1 inside the header div it pushes the entire header div down. I realize this happens whenever I apply a top margin to the first visible element on a page. Here is a sample of the css. Thanks! div#header{ width: 100%; background-color: #000; position: relative; } div#header h1{ text-align: center; width: 375px; height: 50px; margin: 0 auto; font-size: 220%; text-indent: -5000px; background: url('../../images/name_logo.png') no-repeat; } html part <div id="header"> <h1><a href="/home.php">Title</a></h1> <ul id="navbar">

    Read the article

  • Change jQuery slider option dynamically based on window width

    - by Nathan
    I would like to change a jQuery option based on window width (on load as well as on resize). I've found solutions close to what I need, but I don't understand jQuery or javascript enough to customize them for my needs. Here's my jQuery code: <script type="text/javascript"> var tpj = jQuery; tpj.noConflict(); tpj(document).ready(function () { if (tpj.fn.cssOriginal != undefined) tpj.fn.css = tpj.fn.cssOriginal; tpj('#rev_slider_1_1').show().revolution({ delay: 5000, startwidth: 1920, startheight: 515, hideThumbs: 200, thumbWidth: 100, thumbHeight: 50, thumbAmount: 4, navigationType: "bullet", navigationArrows: "verticalcentered", navigationStyle: "navbar", touchenabled: "on", onHoverStop: "off", navOffsetHorizontal: 0, navOffsetVertical: 20, shadow: 0, fullWidth: "on" }); }); //ready </script> I want to change the startheight based on window width. If the window width is above 1280 I would like the value for the height to be 515, and if it is below 1280 I would like the height to be 615 and if the width is less than 480 make the height 715. With help from another post I am able to change the css I need using this script: $(window).on('load resize', function () { var w = $(window).width(); $("#rev_slider_1_1 #rev_slider_1_1_wrapper") .css('max-height', w > 1280 ? 515 : w > 480 ? 615 : 715); }); But I need to also change the jQuery startheight value on the fly. Can someone help? Thanks!

    Read the article

  • Jquery Selecting Multiple Classes, Loading External Files

    - by WillingLearner
    I have 2 links, with the class dynamicLoad. <ul class="navbar"> <li><a href="Page3-News.html" class="dynamicLoad news">NEWS</a></li> <li><a href="Page2-Events.html" class="dynamicLoad">EVENTS</a></li> </ul> and then I have this already working code, which loads external pages into a div named #MainWrapper: <script type="text/javascript"> $( document ).ready( function() { $( 'a.dynamicLoad' ).click( function( e ) { e.preventDefault(); // prevent the browser from following the link e.stopPropagation(); // prevent the browser from following the link $( '#MainWrapper' ).load( $( this ).attr( 'href' ) ); }); }); </script> How do I edit this code and my links, so that i can target the 1st link with the classes of both dynamicLoad and news, and then, load another script and/or pages into the main wrapper, without breaking its already working functionality?

    Read the article

  • div content change only jquery Mobile

    - by user3659748
    I have that : <div data-role="page" id="Home"> <div data-role="header" > <h2 class="header">My app</h2> </div> <div data-role="content"> </div> <div data-role="footer" data-position="fixed"> <div data-role="navbar"> <ul> <li><a href="partials/home.html" data-icon="home" data-transition="slide">Home</a></li> <li><a href="partials/about.html" data-icon="info">About</a></li> </ul> </div> </div> </div> </body> I want when a users click on links le content slide on a div content of for exemple home.html who have just that : home that is possible or not ? Thanks :)

    Read the article

< Previous Page | 1 2 3 4 5 6  | Next Page >