Adjust the Scroll Position of an IFrame
Does anyone have an example of how to automatically scroll the page inside an IFrame? I have an IFrame that has no scroll bars, but there's a bit of whitespace that I want to get rid of. Unfortunately, the page in question doesn't have an element in the right area with an ID that I can anchor to. Here is code I was toying with: jQuery(document).ready(function () { jQuery('iframe').contentWindow.scrollTo(20,20); });
live('load',...) doesn't work on images added dynamically to DOM
Hi, I want to be able to execute some callback when images are being added to the DOM dynamically. It's worth mentioning that the images are being brought into the DOM with ajax calls on a third party widget, so I can't hook up to any events of the ajax request/response, nor can I trigger an event on append() and such, because I'm not the one calling those. I tried using $('img').live('load',function(){...}) for this, but it seems live doesn't catch the load event (other events, like mouse events,
Accordion Multiple Submenu
Hi, I'm a newbie to jquery, very much interested to learn it. Trying to write an accordion menu (mouseover menu expand) with multiple submenus, and the structure is built at runtime. Problem: I see the menu created good, but when hover on submenu to see further submenu items, it collapses the parent menu. I basically trying to write something like this (but on hover) - http://blog.evaria.com/wp-content/themes/blogvaria/jquery/index-multi.php For instance, when hover on 'Discounts' the menu
if radio button checked display div #something else display nothing if un checked
if radio button checked display div #something else display nothing if un checked currently I have this and it works but when I click another radio option the div that was activated before stays there. Want a div to show only if certain radio button is checked and if not checked to hide. $(function(){ $('#offer_2').click(function(){ $('#total2').show(); });
jQuery include?
Hey, i have a little problem.. i include <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js"></script> <script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.11/jquery-ui.min.js"></script> <script src="js/test.js"></script> and it works but if i try to use jquery in the test.js file it didnt work, some idea what i can do or why it is? not even $(document).ready(function(){ alert('bla'); }); (in js/test.js) works.. so im sure thats something wrong with how i included
How do I slide left using the changePage function?
Hi everybody, I have searched and tried to find a way to get the transition to slide left when I use the changePage function. What I'm doing is using the swipe function to change page. My code looks like this: $(".map").bind("swipeleft", function(){ var id = $.mobile.activePage.attr("id"); var newPage = parseInt(id); newPage++; $.mobile.changePage("#"+newPage, "slide"); }); $(".map").bind("swiperight", function(){ var id = $.mobile.activePage.attr("id"); var newPage = parseInt(id); newPage--;
Cycle Issue With New Jquery
I hope someone can help me here. I am not even close to anyone you can call a coder, so please be patient with me. I currently have a slider on my homepage that works fine at this point using an older jquery.js version. I am not sure what version it is and it does not say in the file. Well I am adding a new jquery function within the site and I need to use an update jquery.js file. So I am linking from the google api for the latest version of jquery.js and most everything works on the site just fine,
sliderfader that cycles all images in folder?
Trying to adapt a simple slider/fader so that is cycles through all images in a folder. Using this... <script type="text/javascript"> $(function() { var imgs = [ '../images/1.jpg', '../images/2.jpg', '../images/3.jpg', '../images/4.jpg']; var cnt = imgs.length; var $imageSlide = $('img[id$=imageSlide]'); // set the image control to the last image $imageSlide.attr('src', imgs[cnt-1]); setInterval(Slider, 3000); function Slider() { $imageSlide.fadeOut("slow", function() { $(this).attr('src', imgs[(imgs.length++)
anyone know of a draggable image carousel?
cant seem to find anything like that. would a plugin like dragscrollable do the trick?
Browser scrollbar with added easing - Any ideas?
Hello folks. I was wondering how is this easing added to the browser scrollbar. http://www.moodsofnorway.com/#/home This something that I would like to implement on my website. Is this an adapted scrollTo script? I imagine a function storing a current Y & new Y position on the fly as against a fixed value scrollTo. In my search I had a play with the jquery drag and drop, but I could only implement this effect with a div and not with the scroller. Actually writing the script is beyond me at the moment,
.load() headaches
I have this block of code for a context menu: This menu item works perfectly: else if (action == 'folder') { $.post("php/createfolder.php", { folder: el[0].className }, function(data) { $(el[0].parentNode.parentNode).load("php/loadsection.php", { idClass: el[0].className }, function(data) { createMenu(); makeEditable(); } ); } ); } another part of the code never runs the createmenu or makeEditable functions unless I throw an alert! Can anyone help figure
Select change > remove an item from the select field
What I try to do is the following..let's say I have this form: <select name="sSelectMe" class="someclass"> <option value="">select an option</option> <option value="1">option 1</option> <option value="2">option 2</option> </select> How can I remove the first option from the list when someone selects any item?
jQuery + PHP
Hi Everyone, Is it possible to change a table cell background color or add any attributes based on a criteria, anyway, here's my scenario... I have a php table dynamically created onthefly, (let say on load), then i have a sql query returning some values so illustrating; Table: Sql Result 1 2 3 4 5 2 5 7 6 7 8 9 10 What im trying to achieve is use the sql result to add attributes to the table cells so for the illustration say i want to add a bold attribute
Jquery slide
Hi, I have data coming from a DB and, for each row called, I have a sub nav that is hidden. Clicking on a link will toggle the menu down. I am using; $(this).parent().find("ul.subnav").slideToggle('medium'); Which in essence works, i.e. when I click the selected row it drops down and when I click again it closes. Trouble is if I leave it open and click the next row, I get two open and so on. I want all to close other then the one I have clicked to open! Any help would be apprecied.
iframe onload in webkit browser
Hello there, I have prepared this jsfiddle test http://jsfiddle.net/dujdV/5/ which works in Firefox but not in Chrome. Any idea? Regards, Aamir
Trouble with Nested Resizables
I am using jQuery UI's resizable for nested divs, like so: <div id="resizable1"> <div id="resizable2"> </div> </div> I'm running into a problem where disabling resizable 1 also disables resizable 2. So, if I call the following... $("#resizable1").resizable("disable"); ...then I can no longer resize resizable2 either. Has anyone else encountered this, and know of a way around this behaviour? Thanks!
OK - I need your help with droppable/draggable menu
Hi people - I need Yours help. I have html menu: <div id="tree" style="cursor: move;"> <ul> <li class="draggable" id="recordsArray_6"> <span class="droppable">PORTABLE ELECTRONICS</span> <ul> <li class="draggable" id="recordsArray_7"> <span class="droppable">MP3 PLAYERS</span> <ul> <li class="draggable" id="recordsArray_8"> <span class="droppable">FLASH</span>
how to insert mysql php jQuery
im using this teturial http://yensdesign.com/2009/01/how-validate-forms-both-sides-using-php-jquery/ how to insert to mysql i make a new database for test but can't found the way how to insert the records thank you for your time
Eq Selector Question
Hello, I have a question pertaining to the "eq" selector in jQuery. I"m using something like this to apply classes to the navigation menu below. $.each($('ul.menu'), function(){ $('#' + this.id + '.expandsecond ul:eq(1)').show(); }); Which applys the class "expandfirst" to the first nested ul. Does anyone know how I can apply this to a <ul> even deeper, the third level navigation essentially? <ul id="menu" class="expandfirst"> <li>choice 1 <ul> <li>sub choice 1</li> <li>sub choice 2 <ul> <li>third
Force divbox to move down, if other divbox expand
Hey, look at this fiddle http://jsfiddle.net/CW7uF/4/ I want that if i go e.g. on "Main 1" and the div2 expands the other "Main Tabs" slide down and you can fully see the div2 I just tried to do that with div1 ---> position: relative; but dosnt work Any idea why this dosnt work?
Select menu: Overlay vs New page. How to create overlay menu in a dialog page?
Hi to All, I try to use a simple select menu on a dialog page. (see example below). If I copy this code to a normal page it renders itself as an overlay. Unfortunately if I copy the _very_ same code to a dialog page it creates a new pop up _page_. Is there any way to achieve the same rendering in a dialog page as in a normal page? thx. (sorry for this formatting. This sample is exactly the same as the demo from here: http://jquerymobile.com/demos/1.0a3/#docs/forms/forms-selects.html ) <div data-role="fieldcontain">
$.get() returns different object type in IE8 and IE9
Hi folks, Could someone confirm this please? Using the following code, from jQuery 1.5.1: $.get(xml_file).success(function(data, textStatus, jqXHR)) { alert(data); } The returned result seems to be: On IE8 data is an "[object]" On IE9 data is an "[object Document] I guess it should always either be: "[object]" or: "[object Document]", not a mixture as this breaks code. Regards, Yomodo
How do I install jQuery Lightbox 2 on my site with cPanel?
Please can someone answer this for me as best as possible, I am new to plugins and would really appreciate the best help possible. Just all the steps needed in as much detail would be great! Thank you.
JQuery Taconite plugin not working in IE9
Hello I develop a website that relies on the Taconite plugin: Jquery Taconite Site The website works in all major browsers IE 6 - 8, Firefox, Chrome and safari. I am using JQuery 1.5.1 and Taconite 3.57 which are both the latest stable releases. As IE9 has now been offically released I decided to test the website within that browser however some elements of taconite seem to break. Here is the HTML page i am using for troubleshooting this problem, very basic. <!DOCTYPE HTML> <html> <head> <script
parameter name of Deferred constructor can be more semantic
Currently the jQuery define Deferred as Deferred: function ( func ), I suggest it can be defined as Deferred: function ( initialize ) or Deferred: function ( initializeFn ) or Deferred: function ( initializer ) so that the semantics is more explicit, and code is more self-documented.
jquery bubblepopup inside jquery carousel
Hi, I am trying to use the jquery bubble popup inside the jquery carousel. the problem everything works fine. but say if i have 10 items in the carousel, display 5 at a time, hiding the remaining 5 items(which could be opened by clicking the left or right navigation). so when we move the mouse over each carousel item that is visible on the screen, we can see the bubble popup. here, if i move the mouse over the empty area on the screen, i am still getting the bubble pop which shouldnt be visible because
JQuery.ajax response html
i'm developing an application using $.ajax to display information in a div on a webpage after change event: $(document).ready(function() { $('#targa').change(function(){ $.ajax({ url:"index.php?rt=parcheggioOrdinario/parcheggia", type:"POST", data: ({targa:$('#targa').val(), datatime:$('#datatime').val()}), success: function(response){ $('#movimentiParcheggio').html(response); } });
Weird problem in Safari
I was having a problem with some code not working after refresh, but now (with different code) I'm having a problem where the jquery doesn't work on the first load and works after I refresh it any amount of times. Sounds like when the page is cached everything works. With a google search, all I could really turn up is that the jquery needs to be wrapped in the following: $(document).ready(function(){ // your code }); I've done this and it's still not fixing my problem. It's weird, because
Jquery Extraparam as textbox value
$().ready(function() { $("#txtpro_no").autocomplete("getplotno.php", { width: 260, matchContains: true, mustMatch: false, // This I want to pass value of textbox dynamically which is not working extraParams: {id: $("#txtproj_id").value}, // I Tried This Also which is not working //extraParams:{id: function Getval()}, // This Works but no dynamic value
how to : File Chooser after file is selected nor CANCEL
Hello...!! I haven't got any idea, how to put the jquery once file is selected, and not Cancel is selected. Let's assume we have <input name="title" type="text" value="- none -" size="33" maxlength="50"> <input name="filepath" type="file" size="33"> and at another portion of that page also have a similar repeated code as above. I want to put some changes once the File is selected not when the button Browse is Pressed. Is there any work around?
First ajax sample, I need advice.
Hi guys This is my first ajax test sample. Okay here is the codes of sample1.htm <!DOCTYPE html> <html> <head> <style> div { font-size:14px; } </style> <script src="http://code.jquery.com/jquery-1.5.js"></script> </head> <body> <div ></div> <script> $.ajax({ type: "GET", url: "test.js", dataType: "script" }); </script> </body> </html> Below is the codes for test.js document.write("This is from external file, test.js") I tried to run this but it did not show anything, the page
making sure element/selector is an select <option>
hey guys i have a select box that looks like this for exaple: <select id="game"> <option id="mario">Mario</option> <option id="SuperMario">Super Mario</option> <option id="MarioKart">Mario Kart</option> </select>and what i want to do is when selecting #SuperMario i want to find out if its and option like when checking #game is a select box but how to check if select/element is actually an option if (#game.att(''type) == 'select-one') { // code }if anyone could help me with the right code on how
unable to view dialog after loading html and clicking again
Hello, I'm trying to set up dynamic dialogs based on the click of specific links. For example, when the link with the id of 'link1' is clicked, content from an html page is loaded into the dialog div and then the dialog is displayed. This works once, but when i close the dialog and click the link again, I get nothing. How can I ensure that when i load content from an html file, this will work properly everytime it's clicked? I'm obviously not doing something correctly here. Thanks in advance
Is there a JQuery library for Tile design?
Aloha all, I'm trying to re-create a flash animation using jQuery. THe function can be found on http://www.visitcalifornia.com - it is the main animation aka tile design. Thoughts anyone on this or if you have done someting similar in the past or know how to solve the issue let me know. Thanks Jones
Error: Object doesn't support this property or method. in IE6
Can you help me with this. Browser IE 6 and JQuery 1.4.4 Error is at this line$("#form0").validate({ rules: { issueCheckBox: { selectNone: true}} }); in document.Ready function. If code is not properly formatted please see the attachement. Script.txt < script src="../../Scripts/jquery-1.4.4.min.js" type="text/javascript"></script> < script src="../../Scripts/jquery.validate.min.js" type="text/javascript"></script> < script src="../../Scripts/jquery.validate.unobtrusive.min.js" type="text/javascript"></script>
jquery Highlight func.
Hi this jquery Highlight func. I am sending data to function in this way return value.replace(new RegExp("(?![^&;]+;)(?!<[^<>]*)(" + term.replace(/([\^\$\(\)\[\]\{\}\*\.\+\?\|\\])/gi, "\\$1") + ")(?![^<>]*>)(?![^&;]+;)", "gi"), "<strong>$1</strong>"); this send data or value= "Computer<br><span style='font-size: 76%;'>Computer Software</span> this "Computer" not Highlight this Highlight "Computer Software" help me...
force an animation on a page
Hi, How do I force an animation on a page? I'm updating something on a page, but want it to look like a transition with a slide, even though it's the same page. I tried doing $.mobile.changePage(...) using the id of the page I'm currently on, but it didn't do anything. Thanks
Passing Page Parameters
What is the most efficient way to pass one or many data values between two jquery mobile pages? Does anyone have a working example using alpha 3 with 1.5 (or 1.4.4) jquery core? I cannot get the beforepageshow event to properly fire after listview click using the following code. I am using a listview (with data-filter=true) search with data-identity set. When I click the the item, it returns the correct value via alert. However, I cannot get the "beforepageshow" to properly work in item selection
jqGrid - inserting rows from the users clipboard
I am using JqGrid and would like to allow the user to copy a set of columns into their clipboard then I would like to allow them to paste the contents into the jqGrid is this possible?
this function works in firefox but not in IE8 ? traversing through DOM
the below functions work in firefox but not IE8 any idea why? it throws the slow script with no end... $.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
Next Page