Help with jQuery ajax loading accordion
I think this is more of a general jQuery question, thats why I am posting in this forum. I have an index.html which loads the jQuery, and jQuery UI scripts. I am trying to load part of the page using .load(), but this new page contains a jQuery UI Accordion element. The page loads, but the accordion is acting strange, as if only parts of the accordion script are working. Do I need to somehow reload the jQuery scripts every time I update the page with new jQuery elements?
How to force page reload/refresh of previous page when back button is pressed?
This question was asked in the jQuery Mobile forum and the last entry offered an apparently easy solution but I could not make it work. In that forum (link) I posted my setup attempt and aked help from the author but I am not certain if s/he is still monitoring it. I have also attached a text document of my forum entry. Any help will be appreciated!! Gerry
Building a Simple Game
Hello, all! I am working on a very simple 'game' concept — for now called '2-Player, Left and Right Game.' It's actually for an online art project, but I want 'interactive game' to be the medium. I'm pretty sure it should be a fairly simple project, but could be completely wrong — I can read and make some edits to jQuery, but writing it from scratch is something I'm still learning. Here is the layout of the game: Page 1 — Static HTML/CSS landing page w/game title, directions and 'click to play.'
jQuery menu not working properly
The problem is that the selected class is not activated when page is on the selected page from menu and when I hover over the menu the hover image never shows (background-position: 0px 0px;). insted of background-position: 0px -40px;) How can I fix this or what is wrong? Thanks in advance. I am talking about the animate({backgroundPosition:"(0 -40px)"},{duration:150}) that doesn't scroll down the image to the selected part of the image grapichs, image is half top side of it blue and the bottom is
1.7.2 vs. 1.8: manipulating arrays of jQuery containers with ".width" and similar
I'm not entirely sure whether this is an error, it just seems very inconsistent to me, and it's definitely a difference between 1.7.2 and 1.8 which broke my existing code. Check out this jsfiddle (try with both jQuery 1.7.2 and 1.8): http://jsfiddle.net/BRn4x/ There seems to be a problem with arrays of jQuery containers.
Unobtrusive with dynamic form and regular expression is not working
Hello, sorry for posting this problem here but i didn't know where to do. it is reall related to the jquery plugin from microsoft that makes unobtrusive validation. I have a dynamic form and it has two inputs, email and password, the form submits buy jQuery using ajaxForm function. unobtrusive validation didn't work, so i changed the code as the following trying to call validation inside "beforesubmit" function, but i got the problem that the regular expression validation of the email format always
fixing div with page
Hi , i want to know how i can set a div to fix at page left side. even when page is scrolled. I am begineer so i want to code myself rather than using plugin. Thanks
problem with selected first child.....
I just don't get what's happening here.. http://mayacove.com/mobile/test_mobile.html this concerns main section of the page, not top nav... I have a hidden link @ the bottom, "back to top"... I want this link to appear only when the top link in main section is clicked ("Languages & Software"), but try as might, everything I have tried doesn't work... for example, for testing: $('body .wrapper:first-child section').css('border','1px solid red');is ignored.... thought I'd try with .eq(), but don't
Problem with slideshow and adding classes
im using this plugin http://dimsemenov.com/plugins/royal-slider/documentation/#basic-usage and im looking for a way to change menu class if image has current class. If the current image in the slideshow has class bright i want to addClass bright to menu. im using this code <script> jQuery(window).load(function() { if ($('#bild').hasClass('dark')) { $('#widget-menu').addClass('menu-dark'); } else if ($('#bild').hasClass('bright')) { $('#widget-menu').addClass('menu-bright'); } }); </script> this
Documentation for v1.8?
Congratulations on the release of the neat v1.8. Looking good so far. (1) Is there a target date for availability of vsdoc for v1.8? Can I build it myself (I couldn't find any specific instructions on GitHub)? As expected, there are all sorts of execution errors when running a development project using v1.8 code and the old v1.7.2 version of vsdoc. It would be terrific to have the proper vsdoc for v1.8. (2) Please could someone confirm whether the raw xml help info (api.jquery.com/api) has yet
is this a bug?
EDIT: Pretty sure it is, or behaviour changes from 1.7.0 onward. Reporting. I've been trying to isolate a second possible bug (or intentional behaviour change) where there is an inconsistency between 1.7.2 and 1.8.0, but I can't seem to reproduce it in a minimalised code. But during the process of trying to recreate it I noticed that the following html: <html> <head> <script type="text/javascript" src="http://code.jquery.com/jquery-1.7.2.min.js"></script> </head> <body> <script type="text/javascript">
Append modifying <br /> tag
If I append a <br /> tag to a page it is being written as <br>. e.g $('#content2').append('New Line <br />'); looks like <div id="content2">New Line <br></div> I've checked this in 1.7.2 and 1.6.4 - is this a feature? For example - see http://jsfiddle.net/uAqFT/ cheers Stuart
Is there a performance penalty for using an overly broad selector?
I just tried using a specific selector but after ~30 attempts gave up and used a broad selector. In the wrong context the functionality of the selector won't hurt anything. But the right context is maybe 1 out of 100 of the elements selected. Do I pay a performance penalty for this? It's something very broad like: $(document).on("click", "li", function() { $("[blocked]").removeClass("ui-disabled"); } ); Where li is the selector I am concerned about being too broad. There are maybe 200 li's on the
JQuery event binding on new clone rows
Hi , I have been working on a functionality where, i need to implement auto save on each cell of a table and also, add a new row if that cell is the last cell of the last row. The newly cloned row should also have the same binded blur events. I am able to add the new row but the event are not getting triggered. Here is the code.. Please help stuck for long now.. $("#myTable1").live("blur", function(){ var elementValue = document.getElementById("<%=count%>").value.toString(); var value
Insert text at cursor contenteditable
Hello, I would like to make a simple editor for my website, the concept is is turning contenteditable on, so I can edit the div. What I would like to know is how I can insert text at the cursor position in the current div? I have no idea how to google this, so if someone could give some examples or tell me what this technique is called, I'd be really grateful.
conflict with plupload
I'm having a conflict with plupload. Since adding the plupload to my page, none of my .slideToggle doesn't work anymore. Has anyone else run into this problem or know a fix?
reg-reading & print json array values
How to read & print below json array values in html table using jquery [{"det":{"id":1,"fname":"Lenin"}},{"det":{"id":2,"fname":"Lenin"}}] Regards G.Lenin
Contains case insensitive and jQuery 1.8.0
Hello, i have some problems with my conatins case insensitive function and jQuery 1.8.0. This functions works with jQuery 1.7.2. Here is my example: http://jsfiddle.net/M73dy/1/ Can somebody help me? Regards
Callback from closing window does not fire?
Hi everyone, I am working on a cms and I have a button which will open a window where the users can input data. I bound a beforeunload event, but it does not always work. Anyone have any ideas? Here is my code: $('#addText').live('click', function(e) { $(window.open("http://www.website.com/cms/addText.html", "mywindow", "menubar=1,resizable=1,width=550,height=450")).bind('beforeunload', function() { $(this).unbind('beforeunload'); loadFreshContent('text'); }); }); Those two
Soft mouseover effect
Hi, I want to create a soft mouseover css effect, which changes the color of a Link. But I don't now which fuction to use! I tried this: function mover(obj){ if(!obj.length)return; $("a").mouseover(function(){ $(this).animate({color:"#fff"},300); }); } and this: function mover(obj){ if(!obj.length)return; $("a").mouseover(function(){ $(this).css("color", "#FFF").fadeIn("slow"); }); } The first one doesn't work and the second one is as hard as css would produce it. So what is the correct function?
Validation of select field
I have a problem with validation of select field. Because field is automatic filled by jquery the validation script (in php) don't "see" that the field is marked/selected. If I select the field by "click" - everything is ok. but in some cases the user don't have the possibility to select this field (if finish_day is less than 4). What is interesting, when I delete the line 3 - validator works ok, but I need this line in the code - it select and change the another field. The code is below: if( parseInt($("#finish_day").val())
How to get the multiple selected values from the drop down list in jquery
Hi, <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title></title> <script src="Scripts/jquery-1.4.1.js" type="text/javascript"></script> <link rel="stylesheet" type="text/css" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1/themes/ui-lightness/jquery-ui.css" /> <link rel="stylesheet" type="text/css" href="http://www.erichynds.com/examples/jquery-ui-multiselect-widget/jquery.multiselect.css" /> <link rel="stylesheet" type="text/css" href="http://www.erichynds.com/examples/jquery-ui-multiselect-widget/jquery.multiselect.filter.css"
.live method works but .on does not in 1.7.
I read the following : As of jQuery 1.7, the .live() method is deprecated. Use .on() to attach event handlers. Users of older versions of jQuery should use .delegate() in preference to .live(). However in case I was using the .on method things did not work anymore. I do create div elements using the clone method, and have a remove function to remove them from the DOM. This works .... $('.aclass').live('click', function (e) { } This does not $('.aclass').on('click', function (e) { } I will be be
Jquery post timing issue
Hi, My problem: I have 2 functions like this: function submitForm() { // submit form } function doPost() { // do a post } function Login() { doPost(); submitForm(); } So my problem is that the doPost() function doesn't get properly executed, it only works if there is an alert function in it. I tried using the success function of the post to execute the submitForm() function, but it also didn't work properly. Can somebody point me in the right direction. I appreciate any help. Thanks, Erik
Ajax call fail when I can trying to pass the special characters as data..
This is the code I am using to add a comment using Ajax call. <html> <head> <meta charset="utf-8" /> <meta name="viewport" content="width=device-width, initial-scale=1"/> <link rel="stylesheet" href="http://code.jquery.com/mobile/1.1.0-rc.1/jquery.mobile-1.1.0-rc.1.min.css" /> <script type="text/javascript" charset="utf-8" src="js/cordova-1.5.0.js"> </script> <script src="http://code.jquery.com/jquery-1.7.1.min.js"></script> <script src="http://code.jquery.com/mobile/1.1.0-rc.1/jquery.mobile-1.1.0-rc.1.min.js"></script>
IE9 Alert Box Not Showing Data, Works in IE8?
Why does this Alert box work perfectly using IE8, but shows nothing using IE9? Also, data.length never shows anything in Alert box! $("[id$=txtData]").blur(function(event) { var data = $.trim($(this).closest("tr").find("[id$=txtData]").text()); alert(data); }); <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" Width="900px"> <Columns> <asp:TemplateField HeaderText="Id"> <ItemTemplate> <asp:TextBox ID="txtData"
Selectors: How can I select this Box ?
Hello, it drivs me crazy, that I don't know how to select this element. I got a HTML-Code like this: <div class='blogbox' id="4"> <div class='blogdate'>16.July 2012</div> <h2 class='blogheadline'>Title</h2> <div class='blogtext'>Previewtext</div> <div class='blogimage'> <img src='images/Blogimages/asdf.png' width='140px' height='140px'
My focus() doesn't seem to be working....
I have a <input type="text".....OnChange="fixdateformat" id="birthdate"> function fixdateformat() { var dait,month, day, year; dait=Strtrimchar($("#birthdate").val(),"/"); var daitlen=dait.length; if (daitlen != 8) { alert("Invalid Format: Must be MM/DD/YYYY or MMDDYYYY. Example: 01/01/2012 or 01012012. Please Re-enter."); document.getElementById("birthdate").focus(); or .$("#birthdate").focus(); } else { month=dait.substring(0,2);
jQuery 1.7.2 - Select menu option mouseover shouldn't display preceding image in list
Stuck here with sorta dilemma, I use this code to allow display of images in div via mouseover of select menu option: $("#selectMenu").on("mouseover change", function() { oScroll2.tinyscrollbar_update($(this).val()); return false; });Line 2 of code scrolls the appended images contained in horizontal ul li to an anchor (Tiny Scrollbar figures that out) set by value of select option. There are currently 11 anchors for 11 images, but this will grow. Anchor 1 is option value="1" (for first image);
How to override extended functions
Being a former flash developer, it seems I have been spoiled with certain keywords and concepts. I am trying to override a method from another class that I have extended without using prototype. I am not using prototype because every time I use it, I cannot access local variables (even with getters and setters) locally, which I kind of understand. My other goal is to have local and global variables link to be same variable when I updated locally or from a parent class. I have shortened these classes
Ajax request to autocomplete an input field
Hello all, first sorry for my english. I need help to make my ajax autocomplete zip code input field working properly. The input has a maxlength attribute equal to 5. I use the ".post()" function to send the ajax request when the length of the input field reaches 5 caracters. So far everything is working, the user enters a zip code and get all the cities back in a div from where he can choose his city. But I've noticed in the Firebug plugin that when the user enters more than 5 caracters my function
jQuery1.7.2 Selected pulldown menu option value triggers link containing same rel (or name) value?
I am trying to trigger a link that has same rel or name value of selected option value of a pulldown menu, is the following code capable of doing thist? var s = $("this option:selected").val(); $("a.track[rel='s']").trigger("click"); Basically you select an item from the pulldown menu and a matching link gets clicked. Scratching my head on this one (still learning). If above code is flawed, can you suggest some code that achieves what I need? Thanks in advance. - dan UPDATE: I got this function
[jQuery] blockUI leaves hourglass on IE8
Does anyone have a fix for the problem where blockUI plugin leaves the hourglass icon when the popover goes away? it can be seen on the blockUI demo page using IE8. simply click the Default Message and don't move the mouse. http://malsup.com/jquery/block/#page thanks in advance!
set text of dropdown to select
how do i set d text of dropdown as "select" bt there should be no option as select????
Dynamically generated checkboxes don't get checked
I create my checkboxes dynamically. I have one checkbox which is in the code (not created dynamically). For my dynamically created checkboxes I clone it and then change id and name: <div id="sample"> <div class="ui-checkbox"> <input id="checkboxsample" class="custom" type="checkbox" name="checkboxsample" data-iconpos="left"> <label id="labelsample" class="ui-btn ui-btn-icon-left ui-checkbox-off ui-corner-top ui-corner-bottom ui-controlgroup-last ui-btn-up-a" for="checkboxsample" data-corners="true"
Multi directional scrolling
I'm trying to cobble together a way of scrolling to various divs using jquery scrollTo plugin. I have script for diagonal, horizontal and vertical, but how would I get them to work together? My intention is to have four areas, with different layouts in each. The problem I'm having is getting the navigation to go left, it only seems to work properly if it goes horizontal -right, vertical or diagonal- right. I want it to direct to the position of the div specified in the link. Ive also attached a pic
jQuery Objects Are No Longer Draggable Suddenly
I've installed a circular object carousel as a part of a website I've been developing lately. Here is a link to the certain carousel i'm using : http://tympanus.net/codrops/2011/08/16/circular-content-carousel/ Using jQuery I've made the text in every element in the carousel draggable, $(".textPara").draggable({ helper:'clone', appendTo: 'body' }); $(".textPara").draggable("option","revert",true); $(".textPara").draggable({opacity:0.5}); The problem comes up when I scroll up , then scroll down and
the JQuery works in FF, GC and O, but does noting in IE
I've made up a slider and it works in Chrome, Firefox and Opera just as planned. But IE doesn't play like planned. It does follow the sequence, I've checked with the console, but noting happens. The main idea is that I've made up three slides wich show the content after a row of panels dissapear. My latest version is posted on the following JSFiddle http://jsfiddle.net/Reanimatie/thMSp/2/ Does anyone have a clue and is willing to give advice?
return data in $.get method
hi, I have a strange problem when I use the $.get method. I have been develop a little js function to check a simple state. The js function call a php page ... like this if ( ... ) { echo "no"; } else { echo "yes"; } my js function is like that .... $.get('test.php',function(data) { if(data=="no") { window.location = "no.php"; } else { window.location = "yes.php"; } }) now ... when I use an local installation all works fine .... but when
Help with loading images for a very simple image gallery
I'm struggling for ideas of how to create my image gallery, more specifically, how to load a full size image once a thumbnail is pressed. What I want is obviously when a thumbnail is pressed, jQuery will use AJAX to load the image from the server, and put it into a separate div for displaying. However, I can't work out how to make a generic jQuery function that will take a parameter indicating which image is to be loaded.. Each thumbnail is going to have a unique ID, and I would like to somehow access
Next Page