Umm, this is a tricky one to add a descriptive title for!
Basically I have two links on the page that go to the same page when clicked. What I want to do is when I hover over one of those links for the hover to work for both of them and visa versa.
I've got this script which effectively should change the clicked link's opacity to full and its siblings' opacity to 0.6. The only part that works though is the changing the text color to black. Here's the script:
Currently using jQuery's function loadContent(elementSelector, sourceURL) { $(""+elementSelector+"").load(""+sourceURL+""); } and href="javascript:loadContent('#content', 'page/home.html');"
to load some remote content into the main container. The problems is: i'm unable to find any working solution to highlight the current, active menu item (build as an <ul> and styled with external css), considering the main page isn't reloading - especially when i'm in no way able to understand JS at all.Would any of you have any idea how to mark the current menu item marked as active untill another one is chosen - and then repeat the function?
As soon as I add this line of code, .selected is nothi-lightedany more. Now, I understand that this is the way this function is supposed to work (guess so,otherwiseit's a bug), but I couldn't find any function in documentation that would go from my current element to the first element that has that classapplied and skip everything in between.
I am working on a simple switch statement that will select the current url and perform a simple action Here is what I am trying:
var url = window.location; //alert(url); switch($(url).val()) {
[code]...
so far my site is loading fine and all the jquery is working, but I am having a real problem getting my alert() to fire. I have checked the url with the alert() outside the switch, it is receiving what it should.
I'd like to be able to get Superfish to expand the entire menu and show the current active link in pathlevel 2. I'm using the nav-bar style and it seems that only pathlevel 1 is visible:
I'm trying to build a menu with an animation color and my problem is that the funtion is apply to all the links in the menu but ideally I would like to apply to all elements less the one with the id current.
at the moment I just created two functions but still apply both of them to the current link.
Here is the code:
<script type="text/javascript"> // font color animation $(".second a").hover(function() { $(this).animate({ color: "#00aadd" }, 400);
I've looked on the forums and google for this, and I can't find anything exactly right:I have a universal navigation, one link is "Print PDF" - I don't want to hand code each page individually.How can I use the current page url - such as "website.com/accomodations.php" to print a PDF named after the page, like "accomodations.pdf", or even better "pdfs/accomodations.php"?OR just any way to print a PDF associated with the current page - I guess it doesn't necessarily need to be the URL that links the files.
I'm not sure if this is the correct place to post this question. If it isn't, please let me know where I should post it.I created a simple content slider with each link directed to a section on the same page. The menu I'm using is straightforward:
I have huge page of links, to whcih I am currently adding. I would like to add a "random link" button which would parse the current page, extract all URLs then load a random link.
I know how to use javascript to modify a newly opened window's properties. Instead, what I want to happen is someone clicks on a link and they stay in the current browser window, but the window size changes to fit my specifications.
Is there anyway I could control the selected item, and put it on the top of the current selection box. I know for the first and last 4 item, it may not be able to show on the top of the select box. But if I have hundreds of record, I want the selected item to show on the top if they not the first or last 4. And I am not interested in the items before the selected item either.
I have the testing code below.
<HTML><HEAD><SCRIPT type="text/javascript"> function searchSel() { var input=document.getElementById('txt').value.toLowerCase(); var list=document.getElementById('items').options;
After an hour of hacking the closest I could get to detecting the current value (Not key, but value) of select statement that works both in Firefox and IE is :
Which is SICK, but I would be more than happy with it, except @ %$*@ Internet Explorer selectElem.selectedIndex is somehow always 0 (ZERO). Now, for my purpose, I am desprate enough to accept just getting the default (initially 'selected') index of my drop down (select). Is there anyway to do that?
Basically I want some of the links in my page to open in new tabs (I'm using Firefox) or windows if the user has their options configured that way. And I want my page to remain intact as it involves some AJAX and takes a while to load.
But ...and this seems to be a big "but"... I don't want the focus to move away from the page I'm on. So techniques such as <a target="_blank"or <a onclick="window.open(...)"aren't working for this requirement. I even tried using a separate function and attempting to return to the original window straight after using the following function: Code:
I have this reservation form found on the main page of: http://www.avis.com.lb/
As you can see the current month "August" is selected as the default month and so is the year and day (the day is programmed to jump 2 days ahead for the renting of the car...)
However if you look closely (check the screenshot attached) you'll see that the month "August" is repeated twice and so is the year "2009", the current month is repeated twice. What I wanna do is remove the duplication and just auto select the current month without duplicating it.code...
I've created the simple select box below that will "onchange" when an item is selected. I'm trying to apply the "selected" or "selected="selected" attribute to items that are chosen from the menu. Example: The goal is to show " <option value="/1" selected="selected"> " when page "/1" is chosen and to show <option value="/1"> when /1 is not the current page. I've follow a few simple tutorials with no luck and even tried php conditionals to trigger the "selected" attribute with no luck.
I'm trying to create a group of radio buttons that enable user to select whether to maintain the current image, remove the image or upload a new image. If user selects maintain the current image or remove the image, the upload field will be disabled, when user select upload a new image, the upload field will be enable. My script is as below but I do not get it work correctly, do you have any advice for me?
HTML Code: <script type="text/javascript"> function Disab() { frm=document.forms[0] if(frm.change_voucher.checked) {frm.img_voucher.disabled=false} [Code]....
I have a 2 column page.Left nav which contains a list of items with links to their respective details page.What I'd like to do is to load that link into the div in the right side of the page.want to do this via Ajax, so I don't have to reload or redirect the page.I do have my layout coded, but my jquery code is not even close to work, so I didn't post it here.