Search Results

Search found 2953 results on 119 pages for 'charlene li'.

Page 45/119 | < Previous Page | 41 42 43 44 45 46 47 48 49 50 51 52  | Next Page >

  • Ajax: Appending list-item at the top

    - by ptamzz
    I'm calling a php processing file using ajax an appending the returned HTML usign the code below $.ajax({ type: "POST", url: "proc/process.php", data: dataString, cache: false, success: function(html){ $("ul#lists").append(html); $("ul#lists li:last").fadeIn("slow"); $("#flash").hide(); } }); It appends a <li></li> item at the end of the ul#lists. I want the returned list-item <li></li> at the top of the lists instead of being appended at the last. How do I do that??

    Read the article

  • Select Menu, go to url on select with JQuery?

    - by Keith Donegan
    Hey Guys, I have the following html: HTML markup <ul id="test"> <li><a href="http://www.yahoo.com">yahoo</a></li> <li><a href="http://www.google.com">Google</a></li> </ul> And some JS code: JQuery/JavaScript Code $('ul#test').each(function() { var select=$(document.createElement('select')).insertBefore($(this).hide()); $('>li a', this).each(function() { option=$(document.createElement('option')).appendTo(select).val(this.href).html($(this).html()); }); }); This code produces a select dropdown menu, exactly what I want, but my question is how do I go to the url on select? So if I click yahoo, it brings me to yahoo.com? Thanks for your help!

    Read the article

  • jQuery, wont change value but will change any othere attribute...

    - by Phil Jackson
    function send_mail( token, loader ) { $(".send_mail").bind( "click", function() { try{ var to = $(this).attr('ref'); var mail_form = $("#mail_form"); mail_form.find("li:eq(0) input").val("sdsds"); //mail_form.find("li:eq(0) input").attr("ref", "sdsds"); //mail_form.find("li:eq(0) input").attr("value", "sdsds"); $.fancybox(mail_form.html(), { 'autoDimensions' : false, 'width' : 360, 'height' : 200, 'transitionIn' : 'none', 'transitionOut' : 'none', 'scrolling' : 'no', 'showCloseButton' : false }); return false; }catch(err){alert(err);} }); } My problem being that the above will not work yet if I use //mail_form.find("li:eq(0) input").attr("ref", "sdsds"); it will change the ref and even //mail_form.find("li:eq(0) input").attr("value", "sdsds"); will not work... Any ideas whats happening here?

    Read the article

  • Where do you hang your semantic information, html?

    - by bobobobo
    Well, I keep putting semantic information about what an element means for the page logically in the class attribute <li class="phone-number">555-5555</li> It seems to work for this dual purpose of hanging semantic information and a pointer to how to style it. I'm not sure if this is the best idea, I'm trying to see if others have other ways of doing it. I also started to use a hidden input: <li>555-5555 <input class="semantics" type="hidden" value="phone-number" /></li> inside an element, so with jQuery, I can retrieve additional information about the element using li.find( '.semantics' ).val() To get an element's semantics from JavaScript

    Read the article

  • slide navigation

    - by robosot
    I'm trying to make slide navigation. Here is my code html <li> <a href="#">Services</a> <div class="subcategories"> <a href="#">Cleaning</a> </div> </li> The subcategories div is hidden. js $('li a').hover(function() { $(this).next().slideToggle('fast', function() { }); }); This code works. The problem is that when the mouse goes out of the li a the subcategories div disappears. What i want is that when the user point the li a the subcategories div to be shown so the user be able to click on some link of the sub navigation.

    Read the article

  • Is it possible to append html code in parts via JQuery?

    - by phpheini
    I am trying to append li elements coming from a php file with JQuery. Problem is that the html code needs to be seperately appended to different html IDs according to the key value. Unfortunately as I understood append() can only append correct html with all elements closed. Otherwise it will automatically close the tags. The following code will NOT work as dval contains code like <div><li class="some">Some value</li> and append() will make <div><li class="some">Some value</li></div> out of it. So I was wondering whether there is another way, maybe a function other than append() to be able to append html parts? $.each(obj, function(key,val) { $.each(obj[key], function(key, dval) { if(key == "text") { $("#" + key).append(dval); } }) });

    Read the article

  • Unable to find the cause of an annoying content gap in my HTML/CSS?

    - by user1472747
    I'm quite new to CSS / HTML, and can't find the cause of this little bugger. I want it gone, so that the banner and the nav bar touch each other. Any help is greatly appreciated!! Here is the code for the site. I took out some of the irrelevant code. <!DOCTYPE html> <html> <!-- *****CSS CODE START*****--> <style type="text/css"> #container { margin: 0 auto; width: 900px; background: #fff; } #header { margin-top: 0px; } #header h1 { margin: 0; } #navigation { float: left; width: 900px; background: #333; } #navigation ul { margin: 0; padding: 0; } #navigation ul li { list-style-type: none; display: inline; } #navigation li a { display: block; float: left; padding: 5px 10px; color: #fff; text-decoration: none; border-right: 1px solid #fff; } #navigation li a:hover { background: #383; } #content-container { float: left; width: 900px; background: #fff url(/wp-content/uploads/layout-two-fixed-background.gif) repeat-y 100% 0; } #content { clear: left; float: left; width: 619px; height: 720px; padding: 10px 0; margin: 0 0 0 0px; display: inline; overflow: auto; } #content h2 { margin: 0; color: #003D5D; padding:10px; } #contentBody { padding:10px; font-size:22px; } #aside { float: right; width: 280px; padding: 20px 0; margin: 0 0px 0 0; display: inline; background: #cccccc; height: 700px; border-left: 1px solid #333 ; } #aside h3 { margin: 0 20px; color: #003D5D; font-family: Times New Roman; } #asideText { margin: 0 20px; font-family: Times New Roman;} #footer { clear: both; background: #ccc; text-align: right; padding: 5px; height: 1%; border-top: 1px solid #333 ; } </style> <!-- *****CSS CODE END***** --> <!-- *****HTML CODE START***** --> <body> <div id="container"> <div id="header"> <img src = file:///Users/jduffy/Desktop/projectSite/banner1.jpg> </img> </div> <div id="navigation"> <ul> <li><a href="file:///Users/jduffy/Desktop/projectSite/home">Home</a></li> <li><a href="file:///Users/jduffy/Desktop/projectSite/theProject">The Project</a></li> <li><a href="file:///Users/jduffy/Desktop/projectSite/Pictures">Pictures</a></li> <li><a href="file:///Users/jduffy/Desktop/projectSite/Contact">Contact us</a></li> </ul> </div> <div id="content-container"> <div id="content"> <h2> Page heading </h2> <div id="contentBody"> <p> home pagehome pagehome pagehome pagehome pagehome pagehome pagehome pagehome pagehome pagehome pagehome page home pagehome pagehome pagehome pagehome pagehome pagehome pagehome pagehome pagehome pagehome pagehome page home pagehome pagehome pagehome pagehome pagehome pagehome pagehome pagehome pagehome pagehome pagehome page </p> <p> test2 </p> <p> test3 </p> </div> </div> <div id="aside"> <div id="asideHeading"> <h3> Aside Heading </h3> </div> <div id="asideText"> <p> test5 </p> </div> </div> <div id="footer"> <text id="footerDate">0</text> </div> </div> </div> </body> <!-- *****HTML CODE END***** --> </html> <!-- *****JavaScript CODE START***** --> <script type="text/javascript"> /*date*/ var today = new Date(); document.getElementById("footerDate").innerHTML = today; </script> <!-- *****JavaScript CODE END***** -->

    Read the article

  • Custom jQuery Gallery Thumbnail Behavior

    - by steve
    I recently got some help on here from SLaks (thank you) on the behavior of my custom gallery. I'm now trying to fix the way the thumbnails function. I've been toying with it for about an hour but I can't get it to work. Live version of the code: http://www.studioimbrue.com . Currently the code is as follows: $('.thumbscontainer ul li a').click(function() { var li_index = $(this).parents('ul').children('li').index($(this).parent("li")); $(this).parents('.thumbscontainer').parent().find('.captions ul li').fadeOut(); $(this).parents('.thumbscontainer').parent().find('.captions ul li:eq('+li_index+')').fadeIn(); }); $('.container .captions li').click(function() { var nextLi = $(this).fadeOut().next().fadeIn(); if (nextLi.length === 0) //If we're the last one, nextLi = $(this).siblings(':first-child').fadeIn(); }); The only problem is that when the gallery image is clicked, it goes to the next image in the series, yet the thumbnails do not change to the next one in the list. You can take a look at my previous question to see our discussion. Thanks

    Read the article

  • How to call RequiredFieldValidator on client before postback

    - by Si
    I've inherited some code which breaks a page up into tabs using divs. On the first page there are many required field and regex validators. The problem is a user can switch to another tab, trigger a postback and fail the validators on the first page, leaving things in a mess. What I want to be able to do is perform the validation on the first page as a user selects another tab, thus preventing them from moving to a new tab until the first page is valid. <ul> <li><a href="#tab1">Tab 1</a> </li> <li><a href="#tab2" onclick="return isValid();">Tab 2</a></li> <li><a href="#tab3" onclick="return isValid();">Tab 3</a></li> </ul> Where isValid needs to fire off the validators. Thanks!

    Read the article

  • Using Jquery UI Tab control in ASP.NET MVC

    - by mike3333
    I am new to jquery and am trying out UI plugins. For some reason this following code does not work, in the sense, it does not render the tabs and it's just a bunch of text. But when I copy the page source and paste it in the html page, and put it in the views folder, everything looks great, so , I assume all the js paths are good. Any ideas? <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> Details $(document).ready(function() { $("#tabs").tabs(); }); <div id="tabs"> <ul> <li><a href="#tabs-1">Text 1</a></li> <li><a href="#tabs-2">Text 2</a></li> <li><a href="#tabs-3">Text 3</a></li> </ul> <div id="tabs-1"> <div>tab1 content - adsfadfadsf</div> </div> <div id="tabs-2"> <div>tab 2 content -adfadfadf </div> </div> <div id="tabs-3"> <div>tab 3 content -adfadfadfadf</div> </div> </div> </div>

    Read the article

  • Links on SharePoint 2010 Master Page not changed based on Alternate Access Mappings

    - by victor_c
    We are creating a custom branded Master Page in SharePoint 2010. To make the page similar to a legacy page we have implemented an html based custom dropdown navigation menu we had in place directly on the Master Page (consisted of basic HTML elements ULs and LIs with A tags styled with a CSS class). I assumed the links from the basic HTML on the page would be subject to Alternate Access Mappings currently in place, but it seems to not be the case. On a test page opened in 3 different URLs (http://sharepoint2010, http://sharepoint2010.mydomain.com, https://sharepoint2010.mydomain.com) the links from a WIKI page are modified as I expected, but the links from the Custom Navigation Menu (plain HTML on the Master Page) are not modified. I can see where that would be useful... But is there a way that I can add links on the MasterPage in a way that SharePoint parses them first, making them subject to Alternate Access Mapping translation? I tried placing a link inside a SPLinkButton control, but it didn't achieve the desired behavior. e.g. <ul id="navmenu"> <li><SharePoint:SPLinkButton runat="server" NavigateUrl="http://sharepoint2010">sharepoint link</SharePoint:SPLinkButton></li> <li><a href="http://sharepoint2010">sharepoint2010</a></li> <li>test</li> </ul> When I access the page via https://sharepoint2010.mydomain.com the links above are still http://sharepoint2010 rather than https://sharepoint2010.mydomain.com Any thoughts? Thanks, Victor

    Read the article

  • CSS - Inheriting layered background images

    - by NNN
    CSS3 supports multiple background images, for example: foo { background-image: url(/i/image1.jpg), url(/i/image2.jpg); } I'd like to be able to add a secondary image to an element with a class though. So for example, say you have a nav menu. And each item has a background image. When a nav item is selected you want to layer on another background image. I do not see a way to 'add' a background image instead of redeclaring the whole background property. This is a pain because in order to do this with multi-backgrounds, you would have to write the base bg image over and over for each item if the items have unique images. Ideally I'd be able to do something like this: li { background: url(baseImage.jpg); } li.selected { background: url(selectedIndicator.jpg); } And have li.selected's end result appear the same if I did: li.selected { background: url(baseImage.jpg), url(selectedIndicator.jpg); } Update: I also tried the following with no luck (I believe backgrounds are not inherited..) li { background: url(baseImage.jpg), none; } li.selected { background: inherit, url(selectedIndicator.jpg); }

    Read the article

  • Textbox autofill not in correct position in safari

    - by jerjer
    Hello All, Has anyone experience this weird issue on safari? Textbox autofill is not at its correct position, please see screenshot below. I have been searching for answers in google for almost a day, still no luck. This is the built-in autofill feature of safari. Here is the markup: index.php <html> <body> <div id="nav"></div> <div id="content"> <iframe style="width:100%;height:100%" src="add_user.php" frameborder="0"></iframe> </div> .... </body> </html> add_user.php <html> .... <body> <form method="post"> <h3>Add User (Admin only) <div id="msg">Please enter First and Last Name.</div> <ul> <li><label>* Email</label> <input type="text" id="email" /></li> <li><label>* First Name</label> <input type="text" id="fname" /></li> <li><label>* Last Name</label> <input type="text" id="lname" /></li> .... </ul> </form> </body> </html> I am suspecting that this is caused by the iframe, but it works just fine in other browsers. Also I could not change the page design(using iframe) right away for practical reasons. Thanks

    Read the article

  • Tabs in asp.net mvc

    - by Xulfee
    I have three tabs on page and one user control. I want to RenderPartial on each tab. <script type="text/javascript"> $(document).ready(function() { $("#tabs").tabs(); }); </script> <div id="tabs"> <ul> <li><a href="#tabs-1">Text 1</a></li> <li><a href="#tabs-2">Text 2</a></li> <li><a href="#tabs-3">Text 3</a></li> </ul> <div id="tabs-1"> <% Html.RenderPartial("usercontrol", Model); %> </div> <div id="tabs-2"> <% Html.RenderPartial("usercontrol", Model); %> </div> <div id="tabs-3"> <% Html.RenderPartial("usercontrol", Model); %> </div> </div> how can i get values from different tabs.

    Read the article

  • Ajax/PHP contact form not able to send mail

    - by Steph
    The funny thing is it did work for one evening. I contacted my host, and they are saying there's no reason it should not be working. I have also attempted to test it in Firebug, but it seemed to be sending. And I specifically put the email address (hosted in my domain) on my email safe list, so that is not the culprit either. Would anyone here take a look at it for me? I'd be so grateful. In the header I have: <script type="text/javascript"> $(document).ready(function() { var options = { target: '#alert' }; $('#contactForm').ajaxForm(options); }); $.fn.clearForm = function() { return this.each(function() { var type = this.type, tag = this.tagName.toLowerCase(); if (tag == 'form') return $(':input',this).clearForm(); if (type == 'text' || type == 'password' || tag == 'textarea') this.value = ''; else if (type == 'checkbox' || type == 'radio') this.checked = false; else if (tag == 'select') this.selectedIndex = -1; }); }; </script> Here is the actual form: <form id="contactForm" method="post" action="sendmail.php"> <fieldset> <p>Email Me</p> <div id="fieldset_container"> <label for="name">Your Name:</label> <input type="text" name="name" id="name" /><br /><br /> <label for="email">Email:</label> <input type="text" name="email" id="email" /><br /><br /> <span style="display:none;"> <label for="last">Honeypot:</label> <input type="text" name="last" value="" id="last" /> </span><br /><br /> <label for="message">Comments &amp; Inquiries:</label> <textarea name="message" id="message" cols="" rows=""></textarea><br/> </div> <div id="submit_button"> <input type="submit" name="submit" id="submit" value="Send It" /> </div> </fieldset> </form> <div class="message"><div id="alert"></div></div> Here is the code from my validating page, sendmail.php: <?php // Who you want to recieve the emails from the form. (Hint: generally you.) $sendto = '[email protected]'; // The subject you'll see in your inbox $subject = 'SH Contact Form'; // Message for the user when he/she doesn't fill in the form correctly. $errormessage = 'There seems to have been a problem. May I suggest...'; // Message for the user when he/she fills in the form correctly. $thanks = "Thanks for the email!"; // Message for the bot when it fills in in at all. $honeypot = "You filled in the honeypot! If you're human, try again!"; // Various messages displayed when the fields are empty. $emptyname = 'Entering your name?'; $emptyemail = 'Entering your email address?'; $emptymessage = 'Entering a message?'; // Various messages displayed when the fields are incorrectly formatted. $alertname = 'Entering your name using only the standard alphabet?'; $alertemail = 'Entering your email in this format: <i>[email protected]</i>?'; $alertmessage = "Making sure you aren't using any parenthesis or other escaping characters in the message? Most URLS are fine though!"; //Setting used variables. $alert = ''; $pass = 0; // Sanitizing the data, kind of done via error messages first. Twice is better! ;-) function clean_var($variable) { $variable = strip_tags(stripslashes(trim(rtrim($variable)))); return $variable; } //The first if for honeypot. if ( empty($_REQUEST['last']) ) { // A bunch of if's for all the fields and the error messages. if ( empty($_REQUEST['name']) ) { $pass = 1; $alert .= "<li>" . $emptyname . "</li>"; } elseif ( ereg( "[][{}()*+?.\\^$|]", $_REQUEST['name'] ) ) { $pass = 1; $alert .= "<li>" . $alertname . "</li>"; } if ( empty($_REQUEST['email']) ) { $pass = 1; $alert .= "<li>" . $emptyemail . "</li>"; } elseif ( !eregi("^[_a-z0-9-]+(.[_a-z0-9-]+)*@[a-z0-9-]+(.[a-z0-9-]+)*(.[a-z]{2,3})$", $_REQUEST['email']) ) { $pass = 1; $alert .= "<li>" . $alertemail . "</li>"; } if ( empty($_REQUEST['message']) ) { $pass = 1; $alert .= "<li>" . $emptymessage . "</li>"; } elseif ( ereg( "[][{}()*+?\\^$|]", $_REQUEST['message'] ) ) { $pass = 1; $alert .= "<li>" . $alertmessage . "</li>"; } //If the user err'd, print the error messages. if ( $pass==1 ) { //This first line is for ajax/javascript, comment it or delete it if this isn't your cup o' tea. echo "<script>$(\".message\").hide(\"slow\").show(\"slow\"); </script>"; echo "<b>" . $errormessage . "</b>"; echo "<ul>"; echo $alert; echo "</ul>"; // If the user didn't err and there is in fact a message, time to email it. } elseif (isset($_REQUEST['message'])) { //Construct the message. $message = "From: " . clean_var($_REQUEST['name']) . "\n"; $message .= "Email: " . clean_var($_REQUEST['email']) . "\n"; $message .= "Message: \n" . clean_var($_REQUEST['message']); $header = 'From:'. clean_var($_REQUEST['email']); //Mail the message - for production mail($sendto, $subject, $message, $header, "[email protected]"); //This is for javascript, echo "<script>$(\".message\").hide(\"slow\").show(\"slow\").animate({opacity: 1.0}, 4000).hide(\"slow\"); $(':input').clearForm() </script>"; echo $thanks; die(); //Echo the email message - for development echo "<br/><br/>" . $message; } //If honeypot is filled, trigger the message that bot likely won't see. } else { echo "<script>$(\".message\").hide(\"slow\").show(\"slow\"); </script>"; echo $honeypot; } ?>

    Read the article

  • Follow tab's url in jquery ui tabs

    - by Aakash Chakravarthy
    Hello, I have jquery tabs like <ul id="tabsList"> <li><a href="#tab-1">Name 1</a></li> <li><a href="#tab-2">Name 2</a></li> <li><a href="http://www.google.com/">Name 3</a></li> </ul> <div id="tab-1">content 1</div> <div id="tab-2">content 2</div> the first two tabs load the respective divs. But the third one should go to google.com, instead it does nothing. It just adds http://example.com/index.html#ui-tabs-[object Object] to the url. I am developing a wordpress plugin and the admin page needs a tab interface. I tested this in a local server and not working update: i don't want to load google.com inside the page. It should open the webpage in new tab/window like ordinary links do.

    Read the article

  • Scrolling down to next element via keypress & scrollTo plugin - jQuery

    - by lyrae
    I am using jQuery's scrollTo plugin to scroll up and down my page, using UP arrow and DOWN arrow. i have a bunch of div with class "screen", as so: <div class="screen-wrapper">...</div> What I am trying to do is, when i press UP or DOWN, the window scrolls to the next, or previous div with class of "screen". I have the keypresses taken care of. According to the plugin docs, to scroll a window, you use $.scrollTo(...); Here's the code I have: $(document).keypress(function(e){ switch (e.keyCode) { case 40: // down n = $('.screen-wrapper').next() $.scrollTo( n, 800 ); break; case 38: // up break; case 37: // left break; case 39: // right break; } }); And if it helps, here's the HTML div. I have a few of these on the page, and essentially, am trying to scroll to next one by pressing down arrow: <div class='screen-wrapper'> <div class='screen'> <div class="sections"> <ul> <li><img src="images/portfolio/sushii-1.png " /></li> <li><img src="images/portfolio/sushii-2.png" /></li> <li><img src="images/portfolio/sushii-3.png" /></li> </ul> </div> <div class="next"></div> <div class="prev"></div> </div> And also if it needed, I can provide a link where this is being used if it'll help someone get a better idea. edit And, i forgot to mention what the real question here is. The question/problem is that it won't scroll down past the first element, as seth mentioned.

    Read the article

  • How to get the child of an element being dragged with jQuery UI

    - by Walden
    I have the following html: <div id="gallery"> <ul> <li> <a href="url I want to get">link</a> </li> </ul> </div> and some jQuery that allows it to be dropped on another div: $trash.droppable({ accept: '#gallery > li', activeClass: 'ui-state-highlight', drop: function(ev, ui) { deleteImage(ui.draggable); var $flickrparenturl = $("a").attr("href"); //only gets href of <li> #1, not <li> being dragged $.post("updateDB.php", { 'flickrparenturl': $flickrparenturl } ); } }); What is the correct way to get the href attribute of the child of the element being dragged? $("a").attr("href"); is only getting the href of the 1st li on the page, not the one being dragged.

    Read the article

  • How do I keep child elements together with parent jQuery sortable.

    - by unknowndomain
    I have a list of items like this... <ol> <li> <span></span> <img src="image.png" /> <p>Image Caption</p> </li> </ol> And I want to be able to sort the LI's but not the sub elements, they should just move with their parent. I am using the jQuery to do that... $('ol li').sortable({ 'cursor': 'move' }); And its working but not moving the whole lot just the element you clicked i.e. the <p>, <img> or <span> I can't figure out how to solve this so I looked about and found an option called 'items': '> li' which was recommended but upon using this nothing drags any more but using firebug + jquery plugin I can see there is a sortable on the <li> still. Not sure what to do, example here: http://clareshilland.unknowndomain.co.uk/ Press ctrl+l to login. Enter the login details: Username: clarePassword: demo Select 'edit' from under then 'image' portion of the menu. The sortables should be those polaroids. Thanks in advance, another one I've been banging my head on the table with.

    Read the article

  • Three Checkboxes, One must be selected to enable submit button, needs Jquery?

    - by Jamie
    I have between 1-three checkboxes and by default they are all disabled. In order for the submit button to be active ove checkbox minumum must be selected. Can someone help me with a jquery snippet to achieve this? My markup looks like this and the site used jquery 1.42. Please and thankyou! <form action="/cart/add" method="post" id="pform"> <h3 class="goudy">Make your selection:</h3> <ul id="variants"> <li> <input type="checkbox" name="id[]" value="39601622" id="radio_39601622" style="vertical-align: middle;" class="required" /> <label for="radio_39601622[]">$38.00 - Original Antique Photo</label> </li> <li> <input type="checkbox" name="id[]" value="39601632" id="radio_39601632" style="vertical-align: middle;" class="required" /> <label for="radio_39601632[]">$8.99 - SCAN</label> </li> <li> <input type="checkbox" name="id" value="39777962" id="radio_39777962" style="vertical-align: middle;" class="required" /> <label for="radio_39777962">$2.99 - Rigid Sleeve</label> </li> </ul> <div class="buttons clearfix"> <input type="image" src="../images/add-to-cart.png" name="add" value="Add to Cart" id="add" class="send-to-cart" /> </div> </form>

    Read the article

  • Facebox with other jquery in it

    - by dakemz
    So I have facebox setup and it works. when I load an external page with a tab based navigation (JQuery too) the modal works but the nav doesnt. If it isnt clear I actually want the tabs to be inside the lightbox. And I also have php/mysql running inside the lightbox if that can change anything. Thanks for any help. <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3/jquery.min.js" type="text/javascript"></script> <script type="text/javascript" src="js/jquery-ui-1.7.2.custom.min.js"></script> <script type="text/javascript"> $(function(){ $('#tabs').tabs(); }); </script> <div id="tabs"> <ul> <li><a href="#tabs-1">Informations</a></li> <li><a href="#tabs-2">Factures en attente</a></li> <li><a href="#tabs-3">Marché en cours</a></li> </ul>

    Read the article

  • Disabling normal link behaviour on click with an if statement in Jquery?

    - by Qwibble
    I've been banging my head with this all day, trying anything and everything I can think of to no gain. I'm no Jquery guru, so am hoping someone here can help me out. What I'm trying to do in pseudo code (concept) seems practical and easy to implement, but obviously not so =D What I have is a navigation sidebar, with sub menu's within some li's, and a link at the head of each li. When a top level link is clicked, I want the jquery to check if the link has a sibling ul. If it does, the link doesn't act like a link, but slides down the sibling sub nav. If there isn't one, the link should act normally. Here's where I'm at currently, what am I doing wrong? $('ul.navigation li a').not('ul.navigation li ul li a').click(function (){ if($(this).parent().contains('ul')){ $('ul.navigation li ul').slideUp(); $(this).siblings('ul').slideDown(); return false; } else{ alert('Link Clicked') // Maybe do some more stuff in here... } }); Any ideas?

    Read the article

  • Follow the links of the tab in jquery ui tab

    - by Aakash Chakravarthy
    Hello, I have jquery tabs like <ul id="tabsList"> <li><a href="#tab-1">Name 1</a></li> <li><a href="#tab-2">Name 2</a></li> <li><a href="http://www.google.com/">Name 3</a></li> </ul> <div id="tab-1">content 1</div> <div id="tab-2">content 2</div> the first two tabs load the respective divs. But the third one should go to google.com, instead it does nothing. It just adds http://example.com/index.html#ui-tabs-[object Object] to the url. I am developing a wordpress plugin and the admin page needs a tab interface. I tested this in a local server and not working update: i don't want to load google.com inside the page. It should open the webpage in new tab/window like ordinary links do.

    Read the article

  • Prototype or JQuery change the value of a hidden field?

    - by Nick Faraday
    I'm having some trouble with prototype changing the value of a hidden field. Function: function remove_fields (link) { $(link).next('input[type=hidden]').value = ''; $(link).up(".open_hours").hide(); } If I comment out the $(link).next('input[type=hidden]').value = ''; the hide function works. Trying to set the value gives me an error: $(link).next("input[type=hidden]") is undefined Here is my HTML around the function call: <div class="monday"> <div class ="open_hours"> <li><label for="location_monday">Monday</label> Open: 06:29PM - Close: 04:21PM <a href="#" onclick="remove_fields(this); return false;">remove</a></li> <li class="hidden optional" id="location_monday_open_input"><input id="location_monday_open" name="location[monday_open]" type="hidden" value="18:29:00" /></li> <li class="hidden optional" id="location_monday_close_input"><input class="close" id="location_monday_close" name="location[monday_close]" type="hidden" value="16:21:00" /></li> </div> </div> Not sure what I'm doing wrong here? Thanks Guys!

    Read the article

  • jQuery carousel in a div with display:none

    - by Fred Kafka
    I have to use on my site a jQuery responsive carousel with 4 displayed items that slide one at a time, etc etc. The point is: this carousel is placed in a div with display:none and it appears clicking on a button with a slideToggle script (jQuery). Well, when the div appears the carousel is not displayed. Nothing! Notice that if I remove the display:none the carousel shows perfectly. I've tried a bunch of carousel plugin (bxslider, caroufredsel, elastislide, flexslider) and this issue happens for all of them. And then... I'm going crazy!! Excuse meSorry friends, here is the code: HTML (here is the case of FlexSlider but the code is similar for the other plugins) <div id="hiddenDiv"> <div id="hiddenDivInner"> <div class="flexslider"> <ul class="slides"> <li>...</li> <li>...</li> <li>...</li> </ul> </div> </div> </div> CSS #hiddenDiv{ display:none; padding-bottom:10px; background: url("../img/xxx.gif") repeat left bottom #FFFFFF; } SCRIPT (copy-paste from the site. This script is between $(document).ready together with other scripts. Alredy tried to remove the load function) $(window).load(function() { $('.flexslider').flexslider({ animation: "slide", animationLoop: false, itemWidth: 300, itemMargin: 5, minItems: 1, maxItems: 4 }); }); $("#trigger").click(function () { $("#hiddenDiv").slideToggle(400, "easeInOutExpo"); }); I remind you that with this code and no display:none every carousels work, also if I slide up and then down the div using the slideToggle button (#trigger).

    Read the article

< Previous Page | 41 42 43 44 45 46 47 48 49 50 51 52  | Next Page >