JQuery :: Adding ID Where Cssclass=myclass - Customize Navigation In SharePoint 2010
Aug 2, 2011
My first foray in using JQuery - trying to customize navigation in SharePoint 2010. Have adapted some jquery found online through various sources to meet needs. However, having an ID assigned to the <ul> element that drives my menu is required. SP, while dynamically building menu does not assign and ID to the ul element. Been trying, unsuccessfully thus far, to use jquery to add and ID tag to the proper ul... just wanted to see if that is in fact possible and for any tips in implementing.
Output is <ul class="root static"> and I would like to replace it with <ul class="root static" id="menu">
I have been successfully in simply replacing the cssclass (which doesn't actually help me) and in replacing regular text in the body, but just can't get that ID added to the element.
I try to use the Plugin in SP. The problem is, that the offset is calculated wrong when using it in a Webpart. So the contextmenu is always displayed a litlle bit more to the right and a litle bit more to the bottom of the page. Playing with the left and top values using firebug i have figured out, that the top left corner is inside the webpart right underneath the title of the webpart.
Is there a way to manipulate the plugin so the position of the menu is corrected?
I am working onSharePoint2010.I want to know total number of items existed in list.I have list with 15 items , When i show list as "Single Item Form" on DataFormWebPart using designer ,At the bottom of it is showing me the pages as 1-1 .And when i move to next page it is showing me as 2-2 .Instead of showing me as 1-15,2-15 ,As 15 are the totalitemsin my list. When i pointed my mouse to bottom of the paging column,I see <xsl:value-of select="$FirstRow" /> for showing first row .And<xsl:value-of select="$LastRowValue" />. how can ,I get total items of list usingj query
I know that others have asked about adding a class to a navigation based on indow.location, but I couldn't quite fit my question within those bounds, so hopefully it's alright to ask here.RequirementAdd a class based on window locationComplexityThe current if/else method I have doesn't work correctly, because all subsequent URLs will have the initial word we're looking for,andI'd like to have the final else to be on nav id#3 - (because the url's there will all be varied and may change later so adding those specifically in the if/else seems redundant)So far I've probably explained nothing, so here's what the code looks like:
if (window.location.pathname.match(/(employees)/)) { $('#nav1').addClass("selected"); }
I'm pretty new to Jquery but been using mootools for quite some time now... I just wonder, how could I assign function to jquery? In javascript, we do the regular : function Myclass() { //some code here } and call the Myclass by: Myclass();
In mootools: var Myclass = new Class({ //some code here }); And call the Myclass by: window.addEvent("domready", function() { new Myclass(); });
In Jquery, how would I do that? Is it okay to use the javscript function instead? Or is there a standard way of doing that in jquery? function Myclass() { //some code here } $(document).ready(function() { Myclass(); });
There are a total of 4 dropmsg# divs. I need to be able to input 4 navigation buttons below this code that will, when clicked, pause the ticker and go directly to the "dropmsg#" assigned to that button.
The DOM looks like this. I need to get all hidden inputs that have siblings with class of myClass. So in this example I would like to get the first and third hidden inputs back.
I have a sharepoint site which I am integrating into and I wrote a hundreds of custom functions on my HTML demoin oldschool plain javascript based on the Unique IDs of the elements, however sharepoint 2007/or ASP.NET seems toprepend unique IDS with a long string of crap, the string of crap ('which I shall now refer to as the crapstring') changes based on which page you are on ("eg txtNameValue becomes zctl00_ctl16_g_b132ca0b_b2ad_4e2b_a5e0_8babbb67ff22_ctl00_txtNameValue'"). I found a piece of code in oldschool javascript which works on a page by page basis however I need something I can include in the header that performs the same function across all pages. I was thinking of something in Jquery that works on id*=
#1. I have a div with a class set that displays a border. I would like to set up that class so that when my mouse goes over the div it would turn the border color to yellow by changing the class.
#2. I would also like to be able to click on the element and return its innerHTML.
I have gotten #1 and #2 working perfectly in FF using a combination of CSS :Hover and addEventListener.
For IE I am trying to put the mouse over the DIV and changing the class to a specialized classHover that I have created, and when the mouse is out it reverts back to class.
Problem is it seems like the attatchEvent is trapping every single object on the page. So I end up getting a border around my page, my div tag, my p tag inside my div tag and so forth.
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 developing an org chart for my company and I want to spend some effort to make it interactive. I'm utilizing the Google Visualization API Org Chart tool and writing JavaScript to extend the basic functionality provided by that framework. This is the general plan that I've devised so far (note that I'm somewhat experienced with programming in general, but very new to web development):
(1) I need to store everything on my company's SharePoint site. So far, I've successfully uploaded an HTML file with some JavaScript that loads the appropriate Google Vis API onto the SharePoint. In the same directory, I've uploaded an XML file that contains some sample organizational data. I've employed XMLHttpRequest to read that XML file and draw the org chart. That seems to work well.
(2) I've written some JS functions to create new individuals in the org chart (at the Google DataTable level, not the XML level) and delete selected individuals. After the user makes these changes, I want to provide the option to save the displayed state of the OrgChart in a new XML file that sits in that same directory. I'm not sure how to do this. I've been searching on the web for a while. I don't know how to use the XMLHttpRequest object to create a new XML file on the server.
(3) Once I figure out (2), I'd like to also rename the other XML files to store old copies of the XML database so that I can restore data if I need to. I think this boils down to: How can one manage and rename files on the server side using JS?
Perhaps I'm looking at this using too limited a set of tools. If this is the case, please let me know and point me to the correct place. Remember though: I need to do everything from SharePoint. I doubt that I can load code or run processes on the SharePoint server because I'm just a simple SharePoint user. I can simply load documents (HTML files, XML files, etc.) onto the site.
I am a jQuery beginner and have managed to install basic plugins, but I still have some problems with customization. I am working with the Roundabout plugin and I would like to trigger the Roundabout animation with a mouseover. On the Roundabout website there is an explanation for how to trigger the animation with buttons, but I need an explanation for triggering the animation with a mouseover. I would like to "focus" the image with the mouse rather than a click.
My work in progress is located here and here is the basic code that I am using:
I'm using the validation plugin and tries to get the invalid errors to appear like I want to. If the form isn't valid, I would like to change the invalid elements placeholder text to a different color. That's it. I don't want to show any message somewhere. Is this possible? How?
I want to build a site where the user can customize the product before moving forward. For example: Start with a stock car. User uses drop down menu to change car color (image changes to reflect change) Then User uses drop down menu to change tires (image changes to reflect change while keeping first selection) I know xhtml & css only. Before diving into a new language and library, I'd like to know if I'm even in the right toolbox.
I'm trying to put in my javascript codes and html codes into the sharepoint "content editor web part" source editor.i have this set of javascript codes that needs to work together with the html codes.i created a link using ahref with the tagname as "homepage". i want to hide this "homepage" link using javascript codes.this is the codes that I'm using right now. the html part is working fine[the link "Homepage" is being display and is able to click on] but not for the javascript part.
I sort of see examples in how to lazy load via AJAX request for the jCarousel.But the examples here are geared toward specific APIs such as Fickr.URL...So basically what I'm trying to do is make a jQuery ajax request to one of our URLs that goes to an HttpHandler and spits back XML in the response.Obviously this is our own custom XML so I looked at the source examples on some of what he did with calling the Flickr url to defer loading but I don't know how hard it would be to tweak this plug-in or what to tweak in order to parse my own incoming XML in the response and then get the list items to show dynamically in the <ul></ ul> So I don't know where to start on this. I guess I can look at the source of this plug-in but man, I will still need some assistance on this.
I am having problems with a template I bought. When I customize the menu, and the items have many sub items. the white background slides down way too much. I am learning jquery and can´t find where to correct this URL...See the items: "Diplomados" "Servicios a alumnos" and "convenios".
<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 would like to Update a Sharepoint List (Document Library) Folders using Web Services with Javascript.
I have searched on Goggle but nothing that updates a document Library using UpdateListsItem method & with it being a clientside i need to pass NT Credentials to the List
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:
Id like to control scrolling of two divs with one scrollbar as in this example here
[URL]
At the same time i want to customize the scrollbar. Ive been using Flexcroll which work fine on a single div. But as soon as i insert flexcroll.js to head of document in the example, the sync of the two divs breaks and only the div with Flexcroll attached scrolls.
Anyone know how to solve this? You can find the code im using in the example or i can post.I dont have to use Flexcroll, so if you know of any other application that can customize scrollbar and control scroll on two divs at the same time.
i need to make my alert box stand out a bit more i have looked everywhere but can't find anything! i was looking to do stuff like Bold, Italics, Underline, Fonts, Sizes, Borders, Backgrounds maybe something that flashed!i'm not asking you to do it for me just tell me how and were to put the different codes!