Can't detect click on ul li element
$("ul#menu li").click(function() { alert('Handler for menu click() called.'); }); The above is a function I made to detect when a menu item is clicked on. The menu is made by using CSS on a ul tag's li children. Each li is a different menu item. It doesn't work. Any help is appreciated. -- Gid
scrollTo() in Lib from Kin Blas
Hello, in my iPhone-App (phonegap) I'am using this lib ;-)) How can I call scrollTo(x,y,duration) ?? $('#scrollregion').scrollTo() doesnt work. Rainer
How to read [object Object] returned by Ajax
I have var list = [someID, name, email, "0"]; dataToSend = JSON.stringify({ list: list }); $.ajax({ type: "POST", url: "metodos.aspx/sendEmailYCrear", contentType: "application/json; charset=utf-8", data: dataToSend, dataType: "json", success: AjaxOkAndAdd, error: AjaxFailedEmail });Which sends the data to the URL ok. I process everything on the C# code behind with no problem. But the returned value (I create a string to return some values) is recognized as an [object
load() function 's problem - Cross sites issue?
in my html page, i have a .load function to load a page from a public page on the Internet. it works when i preview it in my computer. it does not work when i put it on the server.. How can i solve? is that something like the server is blocking the cross site request? i don't know if this issue would happen to .load() function
Execute function and subscribe at the same time?
Hello, we're trying to enhance and optimize the forms in our projects with jQuery, but i don't know if something we want is posible... nowadays we are using simple javascript to enable and disable elements in our forms, we have a part to execute when the document is loaded and another that is executed with the interaction of the user. For example, we have a simple select with "Race" : "Caucassian", "African" and "Other", when the user selects something we enable or disable a textfield (where the
Trying to get the id from a checkbox that has been clicked
Hi, i can successfully bind click events to dynamically added checkboxes, but stuck on how to actually get the checkbox's id attribute out. thanks in advance... (using mvc 3 with razor) <script language="javascript" type="text/javascript"> $(document).ready(function () { $('.clickers').bind('click', function (item) { alert($(item).attr('id')); }); }); </script> @using (Html.BeginForm()) { <div data-role="fieldcontain"> <fieldset data-role="controlgroup" class="clickers">
ImgAreaSelect have the same selected area after I changed img source.
I have a small problem with ImgAreaSelect 0.9.5 and Firefox(*), at least one version of Internet Explorer works fine. Go to http://karllarsson.freewebpage.org/imgareaselect/ Click on the "Small" link. Now the images change but the selected area is on the exact same spot as before in Firefox, in IE it change with the images. I like to know if there is some way of refreshing ImgAreaSelect? (*) Firefox 3.6.16 under FreeBSD 8.2 64 AND Firefox 3.6.16 under Windows 7 64
On tab hover
hello On tab hover After the click I lose the scc over, On the below code I get the hover on all the elements at ones but I need to get hover per 1 element <style type="text/css"> div.tabArea { font-size: 80%; font-weight: bold; z-index:199; position:relative;} a.tab { background-color: #f0f0f0; border: 1px solid #000000; border-bottom-width: 0px; padding: 2px 1em 2px 1em; text-decoration: none; color: #808080;} /*.activeTab { color: White; }*/ a.tab:hover { background-color:
drawing a polygon.
hello I need to see an example that contains drawing a polygon. Could you possibly supply it ? regards Ahmet Temiz
convert js function to jquery
New to jquery, a little confused. How does one safely convert this js function to jquery? Can you even do this in jquery? function ShowToggle(parent,group,id){ var ShowElement = document.getElementById(group + '_' + id); var ControlElement = document.getElementById(id + '_ctrl'); var GroupIDLen = group.length; var DivArray = document.getElementById(parent).getElementsByTagName('div'); for(var i = 0; i < DivArray.length; i ++){ if(DivArray[i].id.substr(0,GroupIDLen)
refresh styles of a text input
is there a way to refresh the styles of an input text box after adding it dynamically? doesn't say so here: http://jquerymobile.com/test/docs/forms/plugin-eventsmethods.html i tried: $('input').textinput('refresh'); $('input').textinput(); $('input').page(); but they don't work. thanks.
Open Accordion on external Link
Hi, I have a problem like many before me. I use as standard accordion as can be seen here. But I would also open a link outside of the Accordion on the page a section. Unfortunately I can not find any reasonable instructions for it. cu Phillip
Need some thing like this in JQuery
Hi, I need some thing like this http://www.marshillchurch.org/ in JQuery. click images at right side and these can slide vertically click more to slide it. and at right site a video collection with respect to each image / banner. If any body have any idea that how it will be done. Please do reply. Thanks Waseem
Tap generates two events on iPad?
Hi, I am doing a few very simple tests with jquery / jquery-mobile and it seems that binding the tap event to a div almost always generates two (or more) tap events. Is this a correct behavior? Everything works correctly if I bind to 'click' instead.
reading xml-file and processing with jquery
Hello, I'm still kinda new with jquery, but here's my problem. I got this xml-file named --> slider-content.php In this xml-file, I get for projects with there data out of a database and is put into the xml-file. What I now want, is that every project is placed within another array variable. I got this far: function processXML(xml) { $(xml).find('project').each(function() { arrayVariable = [$(this).find('id').text(), $(this).find('titel').text(),
Listview + live('vclick') not working with 1.0a4.1
Since ive upgraded to the last version 1.0a4.1 the javascript live('vclick') won't work and it refuses to load the page. Did the code changed again or am i missing something? EDIT: Just noticed the change of vclick to click.
Timepicker for jQuery Mobile, free to download
Hi Everyone. :) I have written a timepicker control called EasyTimepicker for jQuery Mobile. My objective in designing this timepicker was to have a control that was simple to use and provided a simple select with time entries. I built this control mainly for use in an iphone web application and the native select looks very good on this platform; so I wanted the control to capitalized on this feature. I like the way that jQuery Mobile takes the "code less, do more" mantra of jquery to a new level,
Jquery .post with json problem
Hi, I am having a strange problem with my jquery code. I am making an ajax call to a php page and everything seems to work fine except the resulting JSON is coming as [Object][Object], [Object][Object] and so on. Here is my jquery code $.post('user/getPreviousInsertedTSData',{month:month},function(response){ alert(response); },"json");And here is my php code: $this->load->model('timesheets'); $resSet['result'] = $this->timesheets->getUserReport($month,$user); $resStr = json_encode($resSet['result']);
understanding the this keyword in jquery.fn
Hello all, In order to get me started writing my own plugins I decided to follow ch.11 of the 'Learning Jquery 1.3' from Karl Swedberg and Jonathan Chaffer. However I got stuck very early with the following piece of code (p.346): html: <style> .this{color:red} .that{color:blue;} .target{font-weight:bold} </style> <ul> <li class="this">Lorem ipsum dolor sit amet</li> <li>Consectetur adipisicing elit</li> <li>Sed do eiusmod tempor incididunt ut labore</li> <li>Magna aliqua</li> <li class="that">Ut
<ol id="qunit-tests"> not populated
Using IE8, Chrome7.0, FF3.6 and code from the example on http://docs.jquery.com/Qunit. After running tests, as described, a <p id="qunit-testresult"> is visible, but the <ol id="qunit-tests"></ol> element below is empty in the DOM <h1 id="qunit-header">Header text</h1> <h2 id="qunit-banner"></h2> <div id="qunit-testrunner-toolbar"></div> <h2 id="qunit-userAgent"></h2> <ol id="qunit-tests"></ol> <div id="qunit-fixture">test markup, will be hidden</div> I'm stepping through QUnit.js to find where the
draggable stop and droppable bug?
Hello. I have the same code (i created a backgammon game) in two pages. In one it is a simple html with the js attached, and it does not communicate with the server. So i cannot send the move to the other player. The other other one is an aspx page with the same html (literally nothing changed) and is imported at a main page as an iframe so as to create the tables for two players to play. The weird think is this. In both pages, in the js code (which i repeat that it is the same exactly) i have a
jquery.js HELP ?
Firstly i dont have much idea about jquery.js or coding but i am trying to learn as i go along Anyway i have vbulletin forums and i am trying to install a modification that uses jquery.js and bar.js The coder who made the mod has tried to help but can only get it to work using his host for the jquery.js and bar.js I have the code in my "Header" template The following code should be used : <!--- rocketDock Menu developed and Translated to Arabic By Twi[L]ighT Dz , www.shba7.cc/vb --> <!DOCTYPE html
Performance problems in A4 release with dynamic listview
I have encountered some major performance differences between a3 and a4. I have a dynamic listview using <li> elements, in a3 version the following takes 142ms var spList = $("#CustomerList").find( "#listview2" ); spList.listview('refresh'); in a4 version it takes 13204ms. Is there something different that needs to be done in my code or is this a bug?
jQuery UI skeleton theme
This probably is not a new idea but anyways.. I'm a front-end developer and used jQuery UI components multiple times, I think they are easy to implement and usually they do the job just fine. But, there's always but, most of the time our graphic designers want make changes to colors, backgrounds, icons etc. and that gives me usually headache. I have to overwrite UI's othrewise fine CSS in my own css and it feels like a hack (one element, multiple css). So my proposal is jQuery UI skeleton theme css.
live() instead in jquery 1.26?
[CODE] $('#content').find('p:eq(0)').append('<span class="more"> | more</span><span class="less"> | less</span>') $('p:gt(0)').hide(); $('.more, .less').live('click', function() { $('#content').find('p:gt(0)').slideToggle(); $('.more, .less').toggle(); }) [/CODE] i using drupal-6,the jquery is 1.26. if i don't want to upgrade the jquery. is there a way to get the effect? jquery is 1.26 haven't have a suppport to the live() function. is there another function can instead of it. or alter the
A challenge perhaps?
I'm working on a website which requires a chunk of code, the nature of which is proving to greatly exceed my limited knowledge of JQuery. The structure of the site is as follows (not quite sure if this is optimally structured for what needs to be done with it, JQuery-wise): <script> $(function() { $(".menutype,.contenttype").draggable({revert:true}); $(".content").droppable({accept:".menutype,.contenttype"}); $(".content").droppable({ drop:function(event,ui){ $(this) $('div.content').attr('id', 'contenthover')
JQuery Drag and Drop functionality not working
I am attempting to build a page, however using some sample code the page have drag and drop functionality. After using a simple jqeury statement to add to this form, every thing working (drag and drop)properly. Now my actual requirement is I need to generate the controls dynamically. Whne I generated all controls from server side and put all the generated controls HTML snipet in <div id="sort1" class="groupWrapper"> its working fine but when I try to put same HTML snippet in the same DIV using JavaScript
While using iframe, tapping a button causes scrolling to page top involuntarily
Hello all, iphone4(ios4.31). Tapping a button causes scrolling to page top involuntarily. This is how the trouble occurs; Kill Safari process. Run Safari, open frame.html and tap [move pageB]. Scroll down and tap [move pageA]. Then you'd be jumped to page top and the [move pageA] button doesn't work anymore. Page reboot can resolve this trouble sometimes. After killing and rerunning Safari process, you'll face it in high ratio. I am in deep trouble and begging for your kindness! frame.html <html>
How should I document function return type from deferred function?
Let's say, I have a function: /** * My deferred foo * @returns {???} */ function foo() { var dfd = new $.Deferred(); good_old_assync(function(result) { dfd.resolve(result); }); return dfd.promise(); } What should I put for "???"? What is the correct data type?
long poll via .getJSON wierdness on IE7
I'm using long polling for a simple chat. On IE7, however, something bizarre happens: function longPoll () { var data = new Object(); data['room'] = document.getElementById('room').innerHTML; data['user'] = document.getElementById('username').value; alert("poll!") // debug $.getJSON('/chat', escape(JSON.stringify(data)), function (resp, status) { if (!resp) { setTimeout('longPoll()', 250); /* Chrome needs delay */ return; } for (var
Submit button as list link
Now that we can have forms easily in lists I would like the submit to be a link in the list. Is there an easy way to do this? Thanks
Append inside append
I've got a div (mainDiv) that gets appended with a click of button. This 'mainDiv' consists of another div (insideDiv) that needs to be appended inside the 'mainDiv'. In other words, I am trying to append a div which is inside already appended div. Hope I am clear. Definitely I am doing something wrong that it's not working. Will much appreciate to know what am I doing wrong here. HTML form: <div class="mainDiv"> <div class="insideDiv"> Inspected Level <select name="locationId[]">
Looking for an image gallery with photo-by-photo control
I'm looking for an image gallery plug-in that allows you control over the transitions on a per-photo basis. For instance, the transition between photo 1 and photo 2 would be a cross-fade; between 2 and 3, a horizontal slide; between 3 and 4, a vertical slide, etc. Also, allowing different timing for each photo, so that photo 1 displays for 5 seconds, photo 2 for 10, photo 3 for 7, etc. Does any plug-in such as this exist?
Lambda functions in jQuery
Hi ! I'm new in jQuery, and seeing the examples I have noted that you always use lambda functions. Is there any reason for that? why you don't make something like this: $('something').click(on_click); ... function on_click(event) { ... } I think is more clear than: $('something').click( function(event) { ... }); And we can edit and reuse the function easily, also if you are using an editor like Netbeans you can see all your functions in a list. Even more, I think in some situations is
Trouble with Plugins
Hi all, I am a beginner at using JQuery, and thus its plugins are a new thing to me. I have gotten JQuery itself installed and have a functioning Dialog widget working. However, I cannot seem to get the Star Rating widget working. I'm not sure if I'm not including the right files, or if I'm incorrectly using the code. This is primarily because I don't fully understand how the whole process works in general. Here are the applicable snippets of my code: This is located in the <head> element of my HTML
TableHover plugin not working on Firefox
Hello, I am using the tablehover plugin on a dynamically populated price list. It is working on IE, Safari, and Opera but not FF. I just want the prices to turn white on rollover The plugin is old ('07) but I did not find anything newer when I was searching. Any help would be amazing, as I am over my head on this one... thanks! links: http://beads.donovansmithdesign.com/prices/printing-prices.php http://beads.donovansmithdesign.com/js/jquery.tablehover.js
Jquery: can't drag input images.
Hi, I got a few input images that I want to be draggable. but when I used the jquery .ui draggable it would add the class to the input images but the input image won't be draggable. Does the drag by jquery .ui allow input images to be draggable? here is the code I am trying to do : <input type="image" id="contact_button" src="/location/contact_button.png">Here is the jquery code: $("input,#contact_button").draggable();I have selected all inputs and the contact button. Which is a input image. this
Check if form has elements or is empty?
Hi, I was wondering if I can get some help. I have a form that is a regular form but in some cases it might be empty. <form id="myform"></form> or it might have some elements <form id="myform"><input name="X" value="X" /><input name="Y" value="Y" /></form> What is the proper way to count or check if the form has say inputs, select, textarea, etc..., or check if it's empty?
How does the jquery ui framework icons work?
Hi, everyone, since I'm try to understand the tools I'm working with (and to satisfy my curosity): how does the framework icons work? I understand the concept with the background and the negative offsets to adress one small piece of the background. So I expected to find the icons as a grid in the according iu-icons_... png's - but they all seem to be empty respectively contains only one color. So where are the icons? Thx in advance for your support!
Active staying button
Hey guys im stuck atm. I cant figure out how to fix this problem. I want my button to stay active when I click on it and turn into the normal one until I click on the other button and so on. Css doesnt help me out in this case. jquery is needed :p someone knows how to fix that ?
Next Page