building unordred list using j query
Hi all, I want to construct HTML for a menu and i want to use DIV with UL The data for the link and text would be coming from a web service which is a sharepoint list like so. As you can see below i want to grab the rows and and it to anchor links... Any help would be appreciated. $(document).ready(function() { $().SPServices({ operation: "GetListItems", async: false, listName: "MenuList", CAMLViewFields: "<ViewFields><FieldRef Name='Title' /></ViewFields>", completefunc:
link click toogle div with multiple contents
hi there, i'm looking for something special i guess. cause normaly i'm googling for something i have in mind, put jquery to the search string and voila, but this time i've searched for almost 3 days and give up now. so i hope you guys can help me i am trying to implent a references site. the idea is that you have 1 html site with a list like reference 1 reference 2 reference 3 ..... with clickable links underneath. then you have an element centered or somewhere else on the site (e.g. defined
post() url problems with seperate folders
Hopefully this is an easy one. i have been beating myself up over this for a day now and it's time to asks the professionals. This is hard to explain but I will try my best. Please let me know if there are any questions. Page making the call: index.php (in root of web) index.php link to js file with jquery code: <script type="text/javascript" src="includes/User/register_script.js"></script> I am trying to use the post function to post data to a php script in a different folder. Here is what my post
Use delay to show loading graphic for 2 seconds
Hi, I have a button on my site, which when clicked calls an ajax function. What I want to do though, is append a loading graphic for just 2 seconds inside the button such that it looks as if the website is 'busy' saving when the button is clicked. This is obviously just for user feedback as the 'save' is done instantly - it's just for user feedback to make the user confident that the save button has worked. To do this, I'm trying to append a loading image to the save button, delay for 2 seconds,
datepicker in updatepanel
hello, I am using datepicker inside update panel in asp.net 3.5. I have created following date picker $(".datepicker").datepicker({ dateFormat: 'yy-mm-dd', showOn: 'button', buttonImage: '/Trap/Images/calendar.gif', buttonImageOnly: true }); The problem is, when I submit the page, it loses the calendar image icon. I can no longer the see the calender icon. Please advice.
Hit a snag with simple accordion menu
I've put together a rather simple accordion menu but am having trouble getting the visible menus to "slideUp" when another sibling <li> is selected. The initial "hide" and "slideToggle" function works just fine. I'm using this format for the menu: <div class="accordion"> <ul> <li><a href="#">NAV LINK #1</a> <ul> <li><a href="#">second level link #1</a></li> <li><a href="#">second level link #1</a></li>
Sending attr with Ajax through .hover
Hello, I'm trying to pass the id of the current hovered item to send to a page, but this is not working.Ive tried several things but nothing seams to work. I tried also $(this).attr . Any help? Thanks $(document).ready (function() { $(".li").hover ( function(){$.ajax({ url: 'test.php', async: false, data:"id=".$(this),
Detecting checked state of checkbox.
This function is getting called as it should. the line "if ($("lumode").attr('checked'))" is not detecting the state of the checkbox properly. It always returns false so mode never gets set to 'all'. (#lumodestate is a button I am using to test the function). $(function(){ $("#lumode").click(function(){ mode = ''; $("#lumodestate").html(mode); if ($("lumode").attr('checked')){ mode = 'all'; } $("#lumodestate").html(mode); }); }); I feel rather stupid in not
Making repeated timed ajax requests
I was wondering if the jquery out of the box allows for repeated ajax requests at a certain time interval to update elements on the page. I found a plug in that can do this: http://github.com/RobertFischer/JQuery-PeriodicalUpdater/ Just wanted to make sire i can ot inherently do it with jquery. Thanks!
Plugin Directory closed but need help with music player
Tried searching the plugins the last couple of days but repository is unavailable. So, thought i'd see if I can get some help here. Here's what I'd like to do: 1) identify a specific set of 'main' pages (ex: Home, Music, Movies, etc.) 2) play a specific song in a music player based upon the page id 3) the music player should have volume off/on (sound on/off). It doesn't have to have any other controls. So, basically there will 5 pages with different subject matter that, when visited, will play a
A beginner asking a question about a UI animation
I am posting this question in this forum because I see other similar questions. Please let me know if this question should be posted in other forums. I cannot seem to get any animation effects working in JQuery. So, I copied the example located at: http://api.jquery.com/fadeIn/ Here is my code: <html> <head> <title> favorites / bookmark title goes here </title> <script src="./jquery-1.4.2.min.js"></script> </head> <body bgcolor="white" text="blue"> <div id="clickme"> Click here
Calculate number of inputs where name starts with name^ and input value is>0
I have many inputs with name totalsum1,totalsum2,totalsum3 etc. I need to calculate number of inputs where name starts with "totalsum" and value is >0. I need to send result to another input with id="#rowtotal". My code: $("#rowtotal").val(($("input[name^=totalsum]").val>0).size()); It's not working. Thank's for your help in advance. Best Regards Rafał Koszyk
How to forbid user copy the information from page by jQuery
$(document).bind('contextmenu', function() { return false; }); I only know how to forbid right click, but how to forbid select by jQuery?
load html via get and observe click events
hi there! still have a problem with the following code: <ul> <li><a class="open-page" href="/somewhere.html">link1</a></li> <li><a class="open-page" href="/elsewhere.html">link2</a></li> </ul> <div id="container"></div> $(document).ready(function() { $('.open-page').click(function(e) { var url = $(this).attr('href'); $.get(url, function(data) { $('#container').html(data); }); return false; }); }); i want to load HTML called by a click on an open-page element into the given container <div id="#container">
Managing "return" in Callbacks
When JQuery initiates an action (e.g. an Ajax PUT) it sets up a callback to handle processing the event when the time dependent action completes. Since the callback operates as an independent thread, it cannot return to a calling routine via the "return" instruction. Is there a way to preserve the context somehow to return to a calling routine? Perhaps another type of callback event?
[Giva Labs] mcdropdown question
I am wondering how to initialize the dropdown with a value that was stored when a value was previously selected. Also, how should I store the value? Docs say, that for dd.setValue(), "The value passed should correspond the a valid list item (<li>) value." What if there are multiple <li>s with the same value? Do you mean the "rel" value?
Sending data via ajax IE permission denied error
$jq.ajax({ type: "GET", url: "http://othersite.com/file.php", data: data, dataType: "json", cache: false, contentType: "application/json; charset=utf-8", success: function() { $jq('#aaa').html(''); $jq('#aaa').append('Data sent :)'); } }); return false; }); } It's working in Firefox, but it doesn't work in Internet Explorer. Any idea how to fix it? I know there could be problem with cross
Slide on Hover: Queue Build Up
Hi everyone, I have a fairly common problem but I didn't find an elegant solution. I'm trying to slide in a submenu on hover. The problem is the queue build up when moving the mouse over it quickly. Here's my code: <script> $(function(){ $("nav ul li").hover(function(){ $(this).find('.subnav').stop(true, true).slideDown('slow'); }, function(){ $(this).find('.subnav').stop(true, true).slideUp('slow'); }); }); </script> I added the "stop(true, true)" to fix
strange behavior in use of sliding effect
Hey guys, posted yesterday my problem by creating my slider for some div containers. Well this Code works now but i looks strange when i slide to the next div. Let me explain it a litte precisely. On click the Slider should switch to the next div. The current div is set to hide and the next div is be shown. This works but the animation look strange. The current div switch to the right and the next div come from left. But between this action something is wrong because the next div comes from down
How to detect mouse down and not release
If I want to do function when mouse click a button and not release, and stop when it relese, how to that?
Using animate
Hi all. I'm having difficulty creating a simple animation using JQuery .animate I want to move a small div from left to right and back again, but at the same time I want it to bob up and down as if it was floating. I'm using vanilla jquery and the jquery.timers plugin. My question really is, how can I get one .animate to work independently of the other. here is my code. $(document).ready(function(){ $("#dress").everyTime(1, function(){ $("#dress").animate({left:"700px"}, 11000).animate({left:"0"},
Search input default value
Hi all, I have a site search input box, and if I click inside the edit box, the "Search.." text goes away, I used focus(). If I click to other element on the page it set's back the "Search.." string. I used blur(). And here comes my problem, when I click to the submit button, it starts to search for the "Search.." string. How can I avoid the form to search the default value, and force search for the entered value, and when I click outside of the edit box, the default text may come back? Thank you
masked input minlength maxlength
Hi, everyone I'm using Josh Bush's masked input plugin. Just wondering. is it possible to give a range length into the masked input? Say for example the allowed input is: 9999-999999 to 9999-9999999999 Is this possible? Thanks
Partial Load Multiple Div with 1 .get/.ajax call
Hi, I am trying to update 2 div with a .ajax (i tried also .get ) call and i make this code working, so that the updating is realized within 2 url calls. but i can 't figure out how to do it within 1 call? if i try the read the data var then i get the innerHTML of the clicked node (dhis) i thought i could read up the data var and extract somehow the innerHTML of #checkout_basketList but i can't because .ajax/.get somehow takes the innerHTML of the clicked node (dhis). so i have to make a new call
Ajax call in dynamic load page not executing in Internet Explorer, works in Chrome.
We have a "label" executing a function onclick that works fine after loading the page. We reload that portion of the page after a new post of data is made and replace the html and script in the div with the addition of the new post. When we click the label after dynamically loading the page all code executes (can't hit a breakpoint) except an ajax call. This is only happening in Internet Explorer. Google Chrome works fine. I have added alerts (alert("message")) in the code to watch the progression
Master and detail with xml datasource
Hi all I am new to jquery and try to do a master and detail with a xml as data source, both on the same page and different page. would be awesome if someone can post some sample code of how to do this in jquery cheers
Copy element attribute values to new element
I would like to change all img tags with a certain class on the page as follows: <img class="ChangeMe" src="some_image_file" > to <div class="NewDiv" style="background: url(some_image_file) no-repeat;" > <img class="ChangeMe" src="some_image_file" style="opacity:0" > </div> The following gets me everything except the background url style attribute: $('img.ChangeMe').css('opacity', '0').wrap('<div class=NewDiv></div>'); I do not know how to "copy" the value of the img tag src attribute to the background
master detail with xml
Hi all I am new to jquery and try to do a master and detail with a xml as data source, both on the same page and different page. would be awesome if someone can post some sample code of how to do this in jquery cheers
addClass does not stick to dynamic loaded div
thanks to IE8 not knowing how to handle last-child css I am using this global workaround, of course with an extra IE css $(document).ready(function() { $("#footer ul li:last-child").addClass("ielast");}); however using later for a dynamic injected (.load) div it does not work $('.some').live('click', (function() { $("#footer nav ul").load("/menu.html #defooter"); $("#defooter li:last-child").addClass("ielast");return false checking in firebug the div defooter does not get assigned the ielast class
How do you find ® with :contains()?
I've tried: var h1text = $("h1:contains('®')").text(); var header_ary = h1text.split("®"); var newHeader = header_ary[0] + "<sup>®</sup> " + header_ary[1]; $("h1:contains('®')").replaceWith(newHeader); and: var h1text = $("h1:contains('®')").text(); var header_ary = h1text.split("®"); var newHeader = header_ary[0] + "<sup>®</sup> " + header_ary[1]; $("h1:contains('®')").replaceWith(newHeader); Neither are working. Any ideas? Thanks!
jquery/ajax & googlemap javascript
Hello everyone, I am working on an application that utilizes a googlemap, jquery/ajax. Here is a quick overview of how it works. Results page has two columns: left column contains a brief description along with a googlemap and the right column contains a list of returned search results. The user can click a search result item and using jquery/ajax it gets loaded into the left column (got that working no problem). The issue I am having is loading the relevant data into the googlemap javascript...is
Jquery & Spry
I am using Adobe's Spry object to populate a page from an XML file and my jquery is not working with it - most likely due to the class being applied to "repeating" elements not yet populated. Does anyone know how to get these two behaviours to play nicely?
[jQuery] Adobe Spry Plus jQuery
I found an interesting entry about using Adobe's Spry framework with jQuery. It specifically deals with the order in which the libraries need to be positioned in order for them to coexist. http://www.succor.co.uk/index.cfm/2007/5/7/SPRY-and-jQuery-load-sequence Please feel free to post comments here and on the blog itself. -- BrightLight Development, LLC. 954-775-1111 (o) 954-600-2726 (c) rey@iambright.com http://www.iambright.com
Help with .prev and .next
I think I could use .next on this, not sure, if there's a better way please let me know. I have a tab set up with an UL, each LI in the UL has a 1px dotted border on the bottom except the "active" li. The "active" tab has a background image. I need to remove the border of the LI before and after any LI that has the class active. $(document).ready(function() { if($('#flowtabs li a').hasClass('active').next('css','border','none') } I don't think the construction is right, is there a
Adding variables to jquery objects
I'm making some jQuery UI elements, and once an element is created, I want to add some custom functions and variables - I don't want to clutter up other jQuery objects by putting the functions in all jQuery objects, and obviously, the variables need to be different between different objects. However, the issue is, when I re-acquire the item, I won't have access to the variable any more. That was probably confusing. Another way of putting it: (function($) { var _MyUI_id=0; jQuery.fn.MyUICreate
Problem with change event on a select box
Hi all, I'm currently having a problem with getting a change event to fire when changing the values of a select box. I've put together the sample code below to show what I mean. <html> <head> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script> <script type="text/javascript"> $(function() { $("select[name='test1']").change(function() { alert($(this).attr("value"));
Simple image gallery
Hi, I have a simple image gallery in mind using jQuery. It's not difficult. Imagine a gallery with nine pictures. When clicking, for example on the second picture this has to be enlarged with some information on the right side (from server using ajax) but the other pictures (including the second picture thumb) has to go to the bottom of the gallery. When clicking again on another picture, the large picture has to be replaced by the new one and so on ... Something like this: Image gallery jquery I
create a image slider
Hi techs, I have 10 image libraries and I want to see 2 pic at a time from each image library. I want to make a scroll option where I can see 1image from each library. any advise on scrolling panel using j query
.load fragment
Hi All I have 2 select boxes, what I need is the second select box to be populated dependent on the primary select box. Basically to put it in context, the primary select box will select the switch a computer is plugged into, which will then populate the secondary select with the free switch ports on the switch (from a database). The code I have is: <select id="switch1" name="switch[]" onchange="$('#switch_port1').load('/index.php?file=devices&action=misc_functions&mode=switchports&switch='+$(this).val()
Is this a bug? : Failed jquery-1.4.2.js, line 1979 character 3
Hi, I have a problem with the above line of code causing a an error when using IE8, but not when using Opera. The code has this comment: // check if target is a textnode (safari) and refers to this property: event.target.nodeType which does not appear to be recognised when I am using IE8. Can anyone advise what steps to take next please? (I tried commenting-out the code, but as another error crops up nearby, it's not much of a solution). best regards BasilBear
Next Page