JQuery :: Using As Navigation Path For The Website?
Jul 19, 2011
i want to load the content in the #contentscroll-div.at the leftmenu navigation all works fine with buttons and stuffthe headpic works fine eitherbut i wanted to have some links in my inner content (which is in #contentscroll-div). i gave them the class .contentlink and added the class to my click function. but it doesn't work.
I have a problem with an application i'm working on (Asp.net using vb.net for developing). I'm normally used to doing middle tier development, so my javascript skills are not up to par. Here is my problem:
I have a javascript file called 'PMP/Scripts/Popups.js' (pmp is the root of the website). In that file is the following function:
function OpenTutorial(sTutID) { var sURL = '../support/tutorials.aspx?tutid=' = sTutID; var sProperties = 'center:yes;etc..' window.showModalDialog(sURL, self, sProperties); }
where ../support is acutally pmp/support.
Most of the website pages are located in sub folders from the root of the website. When editing is to be done on a record, a popup window is called from the main page. the popup pages are in another sub folder (i.e. pmp/review would be where review.aspx resides and the edit page would be located at pmp/review/popups). We give the user a tutorial icon to click on which calls the OpenTutorial function on a button click event.
The problem is the tutorial popup page won't load properly when called from another popup page. I've tried variations of location.href, location.pathname, location.hostname etc.. but can't seem to get the pages to open correctly. The most common error i get is that the url is not correct. here is a sample of the urls being called by the function:
I am currently working on a static website for an auto parts company. I've spent quite a long time with the owner of the business in developing a javascript version of a windows explorer type of navigation to be able to find these parts.
I was just notified that the individual that wants this done also does not want the external .js file to be able to be copied, and someone else profit from his/our work. I know that you cannot hide a client side file; no matter how hard you try someone can get it. However, if I deciped to go with a database instead, could I use a variant of this file or convert it to another type that will allow me to use an access dbase that we have, and yet keep my navigation the way I programmed it?
I'm quite new to web design and Javascript in particular. How to resolve a problem with the navigation bar in a website I am currently working on. The navigation bar has 3 main categories and there is an 'active' state so the page currently viewed is shown as grey underline text in the navigation bar. The thing is, I also have sub-categories that are not included in the navigation bar but I'd like to make it so the sub-category page currently being viewed makes the main category to which it is attached showing as 'active' in the navigation bar.
This is the structure of my site: index.html contact.thml illustration index.html illustrationproject1.html illustrationproject2.html illustrationproject3.html photography index.html photography1.html photography2.html
So for example, if I'm in illustrationproject1.html, the Illustration tab in the navigation bar should be on the active state. This is the code I have so far: Navigation Bar: [CODE] <ul id="nav"> <li class="nav_item"><a href="illustration/index.html">Illustration</a></li> <li class="nav_item"><a href="photography/index.html">Photography</a></li> <li class="nav_item"><a href="design/index.html">Design</a></li> <li class="nav_item"><a href="stories/index.html">Stories</a></li> <li class="nav_item"><a href="profile.html" title="Profile">Profile</a></li> <li class="nav_item"><a href="contact.html" title="Contact">Contact</a></li> <li class="nav_item"><a href="links.html" title="Links">Links</a></li> </ul> [ICODE]
This is the Javscript for the active state: [CODE] function setActive() { aObj = document.getElementById('nav').getElementsByTagName('a'); for(i=0;i<aObj.length;i++) { if(document.location.href.indexOf(aObj[i].href)>=0) { aObj[i].className='active'; }}} [ICODE]
So this code is working but I'm just not sure how to apply it to the subcategories as well. I can see what I should do, write some "if" statement but I don't enough of Javascript yet for this...
I'm trying to implement a minimal navigation bar using jQuery's toggleClass() function but can't seem to get it working.
It's the .img_selector div at the bottom of the page:[url]
I want to toggle the 'active' class for each <a> when it's selected, to indicate which image is showing, so after calling jQuery, in the <head> I've got:
Then the links, which also include the showPic function:
I'm using a script to include images into a slide show using direct URLs to the image files, but I am using fckeditor (PHP) for my users to edit their content. The script in the .js file that pulls the images into the slide show.The user's image file is going to be named something like, "userImage01.php". Inside that file would be their image location path ~ "images/user/image1.jpg".Therefore, I need the above javascript to pull-in "userImage01.php" INSTEAD OF the image's location path.
<div> </div><div>I did some navigation menu and sub menu using jquery ,</div><div> </div><div>like ;</div><div> </div><div>Menu1 </div><div> Sub menu1(some.php)</div><div> Sub menu2(some1.php)</div><div>
I am not terribly familiar with Javascript but i am looking forward to learning, and currently the problem I am facing is this:I have an a file being included to an .shtml document, that serves as my navigation, the code is like this:
I have a ajax program on a page on website A. And I need to let it talk to a program on website B. I tried to put website B into the url of the parameter but it doesn't work.It gives me a "[objet XMLHttpRequest]" error.here is the code on website A:
I'm having an issue using .get and a callback. Basically, unlessI use a fully quantified path when I deploy my site the call doesn't work. When I'm developing on localhost, the site works fine. It's an ASP.NET MVC site. I'm fairly new to jQuery. If I replace the code with an absolute path, all seems fine. Obviously I'd rather use relative paths. I'd be grateful for any insight you could offer.
What I'd like to do is change the path to images with the class .changsrc. Eventually I'll attach this to a link, but for now I only need it to happen on page load. I managed to change the entire image src using attr() but that doesn't work for multiple images with one class name. (maybe I'm missing something there)So... how can I change
img src="images/imagename.jpg" to: img src="images/alt/imagename.jpg"
I'm trying to code a feature for my website using DHTML where the person viewing the website can rotate between viewing the positive/negative points of the website being reviewed. This example was in the publication called Using HTML 4 by Lee Anne Phillips. Code:
I need some help with a path change. It works for just one image but when I use it for multiple images they all change to the same one. I need the src images/fr to change to images/en with a click.
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.
Im looking at a pretty old table driven site for a client. Its an affiliate based site so affiliates of the company can use their booking engine. They want to be able for affiliates to change some of the hardcoded images so as to use their own coloured ones.Is it possible with Jquery to change the image path on all of the images. So for example from:[code]Unfortuntly due to the nature and size of the company I cant use htaccess or do any real code changes hence i thought a JQuery would do it
Is there any way to get the FULL path that is shown in the mcDropdown after the selection? this.getValue() only returns the selected value in the dropdown AND $("input#category").val() does the same, instead of showing the full path. I need the full path. Also, I am not getting the arrows on the items that have children even though looking at the CSS in Firebug, I can see them as they are in the path.
What I'm trying to do is create three rules depending on the path of a page. If the path contains 'best-sellers', I want jQuery to set the class of the page to 'pm-best-sellers'. I can do this, and it works, but when I add the rules for 'express-gifts' and 'eco-friendly' it breaks.
I built a reusable plugin for slideshows. Client now needs me to add something that will affect its reusability.The line below is a snippet which is attached to a nav button. Each slideshow has a dot per slide. When clicked I get the number of sibling that it is within the group and then I look UP the DOM to the nearest div with the class called 'slide_holder'. I then display the slide that has the same sibling number as the dot(In other words - If you click the second dot in the group of dots, then the second slide will fade in. If you click the 3rd dot, then the 3rd slide will fade in)Below is a snippet (CLICK HANDLER)
I have a relative path issue when using jQuery in that I am using the same ajax function sitewide and I don't know how I can send a request to a PHP file without needing to provide the full absolute path. For example, the below code works at top level, but will not work if called from inside a sub folder.