Understanding jQuery.get()
Hello. I am pretty new to jQuery and AJAX in general, and I am trying to figure out how exactly the jQuery.get() function works. I am writing a web application that pulls some html data from a php script, updates a div with that data, and updates that div's scrollbar (using the tinyscrollbar plugin) to "fit" the new contents. Here is my code: $(".menu").click(function(){ var oldContent = $("#dyn").html(); $.get("populate.php", {name: cleanMeUp($(this).html())}, function(data, statusMsg){ //gets page
Building a dynamic list, refesh not working - help please.
I am looking to learn how to add a dynamic list to my page without resorting to PHP. Currently I have a main page that links to sections in the page rather than individual pages that are loaded. The content I want to update has the container: <div content="dynamicList"> Themed list inserted here </div> I can populate the list fine already but the CSS is not applied and using the refresh() method, just goes to the first section in the page (firspage). e.g, <div id="firstpage"> link
Hide or remove based on content of different div onLoad?
I'm pretty new to jscript and jquery (long-time PHP programmer, though) and I'm stuck with how to properly evaluate a value in a document onLoad. Caveat - I am working on this via a CMS (BusinessObjects), so don't have 100% control over what's passed in to the page. HTML: <div id="home_alert"><hr /> <h2>MEMBER ALERT!</h2> <p><a href="/member-home.htm">LOG IN to read new items!</a></p> </div> <div id="member-alert-announce">{module_announcement,i,31801,true,,}</div> if {module_announcement,i,31801,true,,}
jSlide Related Pages
Hi guys, I've developed a new plugin which uses animation to show related pages on a website when you scroll down the page. The plugin works great in firefox but when I tested it in IE7 it seems to have a width issue. Any ideas?!?!? Official Plugin Page: http://plugins.jquery.com/project/jSlideRelatedPages You can see it in action here: http://www.jquery4u.com/plugins/jsliderelatedpages/ Thanks in advance Sam
How duplicate textbox value to another with button in asp.net
I have a registration form and I woud like to make a button what after pressed some textboxe's value copied into some others. I can program it in C# but I would like to use jQuery to I dont have to postback it to the server. <body> <form id="form1" runat="server"> <div> <asp:Label ID="Label1" runat="server" Text="Name 1"></asp:Label> <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox><br/> <asp:Label ID="Label2" runat="server" Text="Address 1"></asp:Label>
Mouse over on background image
Hello I was looking at Bing.ca and I was wondering If I can make the effect of mouse over on background image with using JQuery. Can we make this effect with JQuery? please let me know thank you Roshanak
Horizontal li resizble
Hi all, just wonding if im missing something here , i have a list with items i want to resize, if the list is vertical everything works fine, but when i add in the display:inline; to the li the drag markers appear but nothing happens and i cant make the items resize, all the cursers change its just not playing the game. Any help appreciated .dayStrip { padding:0; margin:0; color:#fff; font-family: arial, helvetica, sans-serif; list-style-type:none; width:700px; background:red; } .dayStrip li { display:inline;
How can I change the background image of each page in the booklet plugin?
Theoretically I think I understand it, but practically I must be doing something wrong in the syntax. I am still really new to JavaScript in general. I am assigning each of the (page) div's it's own id, I think I am getting that part right, and then I want to assign each of them a background image in the C.S.S.. But I am not sure how I should do this. does the statement start with a "." or "#", and should it go in or out of .b-loads {parameters?} .booklet .b-load {text-align:center; .cover {background-image
Draggable Droppable Reset
Hi, is there a way I can reset the ui once the draggable object has been dropped onto the droppable object? I have a draggable object (which has 'revert' to original position set) and a droppable object, Once I drag and drop the object onto the droppale area I can not reproduce the same effect when i drop the same object again. Im not sure if its the 'draggable' or 'droppable' object thats needs resetting? or if its the full ui? Hope ive explained correctly. Kind regards, paffley
Newbie to javascript, trying to learn..
I have been reading a lot about javascript and jquery and I have, in the past, successfully implimented plugins by copying, pasting, and then edited the prebuilt examples.. I am trying to learn a little more. I know the effect that I want, and have an idea of the logic behind it but I dont know enough of the syntax and the language to really get it. I have a little box of divs contained in "navBlock" div and the goal is to the change the color of all of the text inside of the "navBlock" div except
Formating list (li)
Hi Guys, Just started out on JQuery, now I have a simple problem. I am getting data via a php script and formatting them with "<li></li>" tags, but when populated the li wont format correctly. Here is a quick link so you can see what I am talking about. Demo what I want to know is how to have the right menu be like the left.
Remove object attribute
Hi guys/girls, I have an object created by: var obj = {}; obj.item1 = {}; obj.item2 = {}; obj.item3 = {}; obj.item4 = {}; I am wanting to remove one of the attributes. So I call $(obj).removeAttr('item1') This empties the attribute but the attribute still exists. Any pointers would be great! Here's the print out from chrome's js console obj Object item1: Object item2: Object item3: Object item4: Object __proto__: Object $(obj).removeAttr('item1') [ Object item1: "" item2: Object item3: Object item4: Object
Can you set an onclick event with jquery passing a variable as a parameter?
what i want to do- $("#temp").mouseover(bubble(i,i)); i is created from a for loop, and bubble is a fairly large function so not interested in redeclaring it just for this statement ive tried something like $("#temp").mouseover("bubble("+i+","+i+")"); but did not work, any ideas
pass a string from jQuery to php
In a tiered Autocomplete, I need to pass a string from the first selection into a php script to limit the search in the second tier Autocomplete. After much research, I can't get the string to the php. All files are in the same directory. Here's the jQuery: //set countryFilter for the 2nd tier to select stateProvince from only the country selected in the 1st tier countryFilter="countryAbbrev=" + $('input[name=country]:checked').val(); //eg. countryAbbrev=US $('stateProvince').autocomplete
jquery mobile - how to open the selece menu programatically
i'm new to jquery and jquery mobile. hope it's not a silly question. let's say I have a select menu inside a hidden div as below, <div id="divgender" style="display:none;"> <select id="gender" data-theme="b"> <option selected value="Man">Man</option> <option value="Woman">Woman</option> </select> </div> I also have a button in the same page somewhere. when the user click the button, i would like to make the divgender div visible, and open the select list automatically. is
Multiple var addition not updating properly
Hello. Sorry the code example might be a little long but it's repetitive and should be easy to understand. http://jsbin.com/eyeke4/13/edit My real code has 12 examples and not 3 but for the sake of this I had to shorten it as much as possible. When you go on there and preview it, you Select a level, then select a hero, then select 3 items and hit click me. This will give you a result of statistics. Now my problem is all the way on the right you will see all 3 values of AP are added together. In the
Does using delegate automatically unbind listeners when they are removed from the DOM?
I'm working on a photo gallery with pagination. As you go through pages, I'm removing and adding DOM elements. Using delegate would be great, but I don't know if the event listeners will be automatically removed when I destroy the dom nodes with listeners. I don't see anything in the documentation that says either way, and using undelegate everytime I change the dom kind of defeats the purpose of delegate. The reason for this question is this could be a huge memory leak if a user spent any amount
ajax
Hi, i have a simple question, i have started to use jquery in my website, and now i have a problem that i dont know how to resolve. from time to time i have to update the database where i have to insert in the database records about +-200 users where i create about 200k in total without db verifications, this operation takes 2hours, where i have to view what is the status for each user. Now im using popup's and when the script in the popup finish i use javascript to recall it with the next user,
Verizon Droid + JQM + Google Maps V3 API = FAIL
Please help if you know anything about getting a JQM map app working on the Verizon Droid. I am trying to get a geo-centric mobile web app working on multiple devices. I have read in these forums and elsewhere that many of you has had success with this. But when I try the examples listed below, none of them works with my Verizon Droid. The pattern seems to be the load happens and I get some of the Google elements, like the map/satellite button and the "Terms of Use", and even the directions polyline;
fallback text (for no-flash, no-html5 browsers) with j media element? [jme]
I've been getting the jme player up and running on a site this week, and I noticed that firefox with flashblock breaks it completely... the little "play" icon for flashblock never shows up, and since my files (mp3) can't be played back natively, the player just doesn't work with no explanation. I assume this is the same with safari/clicktoflash and ogg files, and non-html5 browsers without flash installed. In any case, is there an option to display fallback text if a user doesn't have html5 OR flash
Fancybox (Lightbox) - Last image not working.
Hi all I have this simple gallery that loads images from an xml file and uses Fancybox to display the images. Demo Everything is working but the last image is not working with fancybox. The last image just displays in it's own window. Can anyone see why the last image is not displaying with fancybox. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <meta
AJAX-Loading multiple elements by index
Hello I'm trying to load elements into a div via AJAX using the load() function. I have a bunch of div's with the same class in a remote file, and want to load the divs with the index of 3-6, (3,4,5,6). I am looking for a selector to get those elements, but can't find one suitable. At the moment my code looks as following: $('#main_wrap').load('portfolio.html .item:gt(2)');Are there a way to add a second selector lt(6) or in some other way get the result i seek?
Focus and Blur event on DIV element
Hi, I want to handle focus and blur events on any DIV element but don't know how? Any ideas? I tried this one: $('.myDIV').bind('focus',function(event){ // something }); but it doesn't work!
tabs used to work in iPad Safari but now they don't -- content truncated
Last year I retrofitted my website to use jQuery tabs (1.4.2 with 1.8.1) and it worked on all browsers and iPad Safari. But since then it has gotten broken on iPad only (still working everywhere else). I believe it was in conjunction with the recent iPad O/S upgrade, though I'm not absolutely certain about this because I just found this problem yesterday when I happened to borrow an iPad. The tabs are now truncating content -- but not always-- and not always in the same place in the document :-(
Asp.net based JQuery Mobile - basic login form is not working
Hi all i'm just getting used to using jquery and thought I'll try a very simple example I'm going to be building this on asp.net web forms (will move to MVC in the future but not right now) i have a very simple html form but it does not simple to be working the code is below <!DOCTYPE html> <html> <head> <title>Test</title> <link rel="Stylesheet" href="Assets/jquery.mobile-1.0a3.min.css" /> <script src="Assets/jquery-1.5.min.js"></script> <script src="Assets/jquery.mobile-1.0a3.min.js" ></script>
Using 1 Plugin causes another to not work properly
I'm a JQuery newb, so maybe this is an obvious question. Im using a an Expander plugin and a ModalPopup plugin. The expander plugin hides some text and allows me to Toggle it on or off...However, if I fire the Popup, I can no longer use the Toggle until I refresh the page. Ideas? Some code below.. $(document).ready(function () { //Hide (Collapse) the toggle containers on load $(".toggle_container").hide(); //Switch the "Open" and "Close" state per
Utility: adding capability detection based on user-agent: $.mobile.capability() = 'FULL' | 'PARTIAL' | 'NO'
That would be really useful if the following function could be added to the $.mobile interface: $.mobile.capability() Return 'FULL', 'PARTIAL', 'NO' Implementing this function is pretty straightforward using the mobile user-agent if we could have access to a exhaustive list of jquery supported mobile devices. Thanks! -stan
asp .net Gridview inside Dialog
Hi ! I'm using jquery from about 6 months inside .NET environment. Now I'm using jquery UI Dialog inside an aspx page (.NET 4.0 framework). I'm having a problem saving data from gridview but now I explain better : I have a page with other fields, a div (dialog) and inside a usercontrol that contains update panel and a gridview inside the contenttemplate of updatepanel. I push a button that save data on page, do a databind of the user control and then I run a Script that show the jquery dialog.
Multiple Javascript files Issue
Hi, I'm having an issue with my website. I was on HTMLDrive.net looking for some cool effects for my site, and when I tried to put two of them in a page together it would not work properly. I can get only one to work at a time. It seems that they somehow interfere with each other, but I don't know how. Now have a little experience with JavaScript and jquery, but nothing I tried would work. Here is what I have in my page header right now: <!--Accordion Nav script--> <script type="text/javascript"
Slide Down navBar via the ToolBar?
Hi. Has anyone implemented a slide-down navBar from the ToolBar? I am using a "Fullscreen" position mode Toolbar and displaying the navBar with it when the body is tapped is non-desirable. I would like the user to tap on the body to open the toolbar as usual but not display the navBar until they tap on a button within the Toolbar. Any ideas or code snippets? Any help will be appreciated: I'm a newbie to jQ (Java). Thnx!
load function not working in IE 9
I use the load js function to load the navigation menu on most html websites I build. I use it on my website http://syntrixsolution.com. However with the release of IE 9 just recently, according to adobe browser labs the load function is not working. Is anyone else experiencing this problem? Don't tell me IE 9 is not going to allow this to work. It works fine in IE 6, 7 and 8. Any help appreciated. I use a mac so can't test properly as my VMware is running vista which doesn't allow IE9 to be installed.
Datepicker in two separate forms on same page?
I have several forms on the same page that need to use the datepicker plug-in. I have datepicker working PERFECTLY on one form. Now I need to add other forms on the page. I haven't been able to get two datepickers working on the same page nor can I find any documentation on whether it's possible. What do I have to do to get two datepickers working in two separate forms on the same page? <form method="post" action="?" name="FORM1"> <input type="text" id="datepicker" size="8" name="InactiveLevel3Date">
Imagin8 plugin installation
Hello, can someone explain to me how to install the imagin8 plugin on a website? I don't understand where to put the html code in the html page, and where to put the call. There are 3 files to download. I don't understand where to put them and how it will work to make them activated. Thank you.
Newbie needs a little help on getting started with themes.
Someone please help me. I know nothing about jquery and I am very much a beginner with css and html and I am working in Dreamweaver. Very much an amateur. I am trying to theme datepicker - I download the theme and move contents to jquery folder where my calendar stuff is now - a partially css-modified-by-me version is housed there and works fine, just looks terrible. When I use the links provided in the download setup instructions I get an un-styled calendar. I have tried every linking combo as
Showing a div below the link making an ajax call
Hi, Trying to make a "<div />" show up below a link that have been clicked. Using delegate since there are multiple link on the site and I want to show them below the linked that is clicked. I having a hard time figure out what the best/right/optimal way is to do that. Since I'm by no means a jquery expert yet. I have tried using the position, and that does position the <div /> the right place, but now I'm having a hard time doing the slideDown. This should first display that its loading. If its
Autocomplete: remote source + categorized items
Hello, I need to combine a remote source (database) with the categorized items. I have tried different ways but I'm a newbie in this matter and I'm confused with the code. Could anybody help with a line of code or a suggestion to understand this?, please: <script> $.widget( "custom.catcomplete", $.ui.autocomplete, { _renderMenu: function( ul, items ) { var self = this, currentCategory = ""; $.each( items, function( index, item ) { if ( item.category != currentCategory ) { ul.append( "<li class='ui-autocomplete-category'>"
anyone know why I can run this in firefox and not in IE ?
this works perfect in firefox but It seems to get caught in loop while collecting items in IE here is the function: $.fn.reverse = function () { return this.pushStack(this.get().reverse(), arguments); }; // create two new functions: prevALL and nextALL. $.each(['prev', 'next'], function (unusedIndex, name) { $.fn[name + 'ALL'] = function (matchExpr) { // get all the elements in the body, including the body. var $all = $('body').find('*').andSelf(); // slice the $all object according to which way
Button becaming disabled after going back in browser history
Hi guys i am using jquery 1.5.1 and jquery-ui 1.8.10. Here is I am asked the same question on stackoverflow http://stackoverflow.com/questions/5368826/button-becamind-disabled-after-going-back-in-browser-history still no responses there. Just duplicate this question here: I have such button: <button value="1" name="submit" disabled="true" id="signup-bb" class="ui-button ui-widget ui-state-default ui-corner-all ui-button-disabled ui-state-disabled ui-button-text-only" role="button" aria-disabled="true">
jQuery Mobile and touch-gallery
Hi everybody, I am newbie. I am trying to do my first web mobile site. Everything ok, but I have a little problem to install a fotogallery. I am trying to use this gallery: http://neteye.github.com/touch-gallery.html I think there's some conflict. Example, the loading animation come out and never go away. Does anyone make this gallery work on jQuery mobile? thanks in advanced to everybody
Saving multiple dialog positions
Hello, I just found this fantastic framework and just created a page with multiple dialog's. The page you can find here. My question is, how can i save all the content + positions from the dialogs? I used google and this forum but didn't find anything usefull. Kind regards brantje
Next Page