I'm trying to get the hover over image selected based on the current page. I've used an external jquery.url.js library to access file and href information. The if statement is reached correctly, but I can't get the code within it to work. Each image is stored within an anchor and, as with the hover code (included), I'm trying to change the end of its source file name from '_off'to '_on' so it's active.
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:
Im having some troubles with some functions i launch in $(document).ready() to initialize the page. Then if i click on browser refresh everything goes fine... even more strange when i place alerts between then calls to these functions everything goes fine too... but the first time the page is loaded it seems that the functions are not executed at all.
1. Take the current URL of the page and open a new window with a URL based on the current page. Some examples (I use "->" to mean "this URL turns into that URL"):I plan to use these bookmarklets in sequence, first pressing 1 to log into the CMS, then pressing 2 to edit the current page.
I am trying to use jquery to layout my form elements. I want to make sure that the script is executed after the whole page is loaded. So i put this script insinde my html file in the head section:
<script type="text/javascript"> $(window).load(function(){ var css_attr = {"float": "left" ,"width":180};
The javascript served banner is moved from #apple1 to #targetplace. Some times the banner is displayed on both places. Are two page impressions counted for this one page the banner is displayed? Executes the browser the javascript once or each time the javascript is moved?
I'm using this jQuery tabs library that uses this simple set up... <!-- the tabs --> <ul class="tabs"> <li><a href="#">Tab 1</a></li> <li><a href="#">Tab 2</a></li> <li><a href="#">Tab 3</a></li> </ul> <!-- tab "panes" --> <div class="panes"> <div>pane 1 content</div> <div>pane 2 content</div> <div>pane 3 content</div> </div>
So clicking tab 1 loads the contents of the first DIV, tab 2 second DIV, etc. I have a different image map that loads into each of the separate DIVs. I have set up a search box that allows me to enter a value that matches an ALT value of one of the <area> tags and then using the scrollTo library, scrolls to that value using the coordinates provided in the <area> tag. Currently I have this working when I manually enter the DIV's class into the script:
var id = $('#search').val(); var elem = document.getElementById(id); if (elem) { var parts = $(elem).attr('coords').split(','); parts = $.map(parts, parseInt); $('div.fms1').scrollTo({ left:parts[0], top:parts[2] }, {duration:1000, axis:'x'}); }}); </script>
I'm trying to figure out how I can set up the search box to search the currently loaded DIV which is loaded depending on which tab is selected. I tried the following unsuccessfully: $('div.'+$(this)).scrollTo({ left:parts[0], top:parts[2] }, {duration:1000, axis:'x'});
how to make an image/text to scroll as the user scroll the page also? for example if the user scrolls down image/text also scrolls down and when the user scrolls up image/text also scrolls up..
A Form has 2 select lists. The size of the 1st select list is 4 which means that at any given time, 4 options will be visible to users & the size of the 2nd select list is 1.
When an option is selected in the 2nd select list, the Form gets posted. Under such circumstances, I want the 1st select list to maintain its state i.e. the option that the user had selected just before posting the Form in the 1st select list should remain selected after the Form posts. I have taken care of this using ASP but there's a petty problem.
Assume that the 1st select list has 30 options & a user selects the 15th option. When the Form posts after selecting an option in the 2nd select list, the 15th option in the 1st select list remains selected but it's not viewable to the user. In order to view the selected option in the 1st select list (which is the 15th option in this case), the user has to scroll down the 1st select list.
Now how do I ensure that the user need not scroll down the 1st select list to view the option he had selected after the page posts i.e. after the Form posts, the selected option in the 1st select list should behave as if it is the default selected option in the 1st select list?
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 having trouble figuring out exactly how to write the confirmation/validation for the card expiration choices compared to the current date. I have the month and year choices in selection menus, as opposed to text boxes. Code:
I have a small script which adds a class to the current menu item selected.
Currently on the page load (this menu is within one page) the first menu item which is loaded does not have this .mywork_active class. Its not until you click it or another item that the class is added.
What would I need to do make the script add this class to the first item on load.
How you handle back button scenario in firefox browser. The problem is when i click browser back button , the javascript on load is not executed and page is rendered from cache.
My requirement is, I have multiple pages in tab format. If i am on first page in edit mode and change any control's value and without saving information i click on other tab that particular time a popup should appear showing validation message say "you are moving without save and it will loos all changes either click ok to loose the changes and move to other page or click cancel to remain on the current page."I tried using var isDirty = false; var msg = 'This page has unsaved changes.Click OK to abandon the changes and leave the page.Click Cancel to stay on the page so that you can save your changes.';
what can be the reasons for the same code which works perfectly in notepad to not show its result in a jsp application done using eclipse??anything to do with settings?
I am not able to display the current date as default in dd/mm/yyyy format in drop down menu..only dd and yyyy apears but month isnt apearing as default..
can u suggest alternative logic and its code to implement the same??
I need a way to scroll to the end of the fileupload filename once that file has been selected with the browse button. So instead of seeing c:FolderNamefoldername, the user will see foldernamefilename.fileextension in that box.
I'm using a JQuery function to slide a div into and out of visibility, but every time I toggle, the browser resets my view to the top of the web page..What I want to happen is when you click to reveal the div, the page scrolls down and the div content is in full view. When I click again to re-hide the div, I want the page to scroll back up smoothly instead of just reverting to the top of the whole page...The page url is: http:[url]....Here's my code:
I've got 2 pages: a current events page and a past events page the current events page loads fine as there is only about 10 events the past events page takes about 30 seconds to load and will crash if u click your mouse in the loading time.
The pages are near identical the only difference is the query that selects the events (> versus <)
The page loads immediately without:
But when i put it back in the above happens. I'm using jQuery.roundedcorners.
In the menu in this page I have four different methods (you can see them in the <script> tag on the pages) of indicating the current page in a menu. I downloaded these from various web pages after Googling "jQuery highlight current page".None of the methods works. Is there something wrong with my selectors? Can anyone see why none of them are working?
I am using an ajax call to generate a new image with some text across it. How can I "replace" the image in the current page with the one I just generated, they will have the same name.