Problem with return $.post
Hello: I'm having a problem with return data from a $.post. Details follow below: The $.post successfully sends data to a .php file. The php file successfully processes the data and compiles results into an array. The array is returning in the console.log. When I return one value of the array (instead of the whole array), the value shows up in the console.log. However, I can't get pull the values in the array into jQuery for use on my main page. In addition, I know something is off in my $.post routine
Could I get a code review for my query dialog/lightbox code please?
Fairly new with jQuery, and am looking for a critique of my code. I am not entirely happy with a few things I have done. 1. Using an id to uniquely identify the buttons, and appending the "_dialog" string to it, so I can target the blocks of code i want to make visible. Seems a bit brittle, but I can't think of a better way. 2. The duplication when binding the hide functions. 3. General feeling that the code is not very modular/clean. I just want to know how I can improve my jQuery coding. Thanks
Еditor for writing jQuery
I found only Netbean. But it have many functions wich are not front-end development oriented. Does anyone know other, or plugin for any popular editor.
Moving pictures, but not a slider
We're trying to create an effect similar to what's on the www.viacom.com home page, which shows images parading across the screen. Any idea how to accomplish this in jQuery? We don't need any of the effects that occur after one of those panels is clicked on, just the scrolling/sliding effect. Once we get it figured out, we'll probably populate it with four to five images.
Making a multipage menu
I'm not sure if I'm calling it the right thing, but it is basically an image menu which lets you select images to display in a gallery and there are only a certain number of images visible per page and you use back and forward buttons to swap pages. I created a PHP gallery for my friend but my only problem is that I can't get the menu to work just the way I wanted. Luckily I have an example to show you guys. We are currently using simpleviewer but I want to make something that is easier for my friend
Assigning div width not working in IE?
I'm just starting to learn about jQuery and had a question about assigning a page width. The work in progress website is here: http://leighmcd.com/blog/ The website is a horizontal scroll, the content on each page is dynamic in width so I'm trying to get the total and assign that to the .main class (which wraps all of the content). $(document).ready(function(){ var contentWidth = $(".contentblock").width(); var strNoDivs2 = $('.contentblock').length; blockContentTotal = contentWidth * strNoDivs2;
how i can add several column in the menu
I all, I'm started jquery, i try add several collumn in the drop menu this is my test http://keo.n.free.fr/cour.html help me form add collum no juste 1 column. I dont't know how i can do it If you have a idea thanks for reply me :)
Problem : append(), load correctly elements but automatically scroll at the top of the webpage
Hi, I have a problem using the append() function of jquery : I have made a webpage which display 10 photographies, at the bottom of the page there is a link for loading 10 more photographies, this work well, all the elements are correctly loaded via an ajax request, but the problem is that the webpage automatically scroll at the top instead of staying at the same position i have no idea of how i can result this problem...
Problem with loading Word generated html
Hi, using this code I want to load a html which i have created in Microsoft Word 2007. $('#Message').Load('Contents.htm'); because in the html file there is <span style:mso-spacerun:yes> </span> tag, jQuery shows each space between span tag as Square Symbol! I don't know hot to fix it. Second, the Message element is in ContentTemplate tag of UpdatePanel which itself is in a ContentPlaceHolder of a content page named default.aspx, and I want to access to it in Masterpage, please help me.
.val() with a "new" input form
Hey guys, on my website is a hidden formular which appears after a simple .click() + .fadeIn() function. But i can't read out the values of any inputs, textareas, ... I think it should run with .live() but i don't know how. Please help
jquery/cycle lite/dynamic css menu not working together nicely
Hello, I'm using jquery 1.8 (tried all other versions too) with cycle lite slideshow (http://malsup.com/jquery/cycle/lite/) and a menu system dynamically generated by CSS (with jquery helpers for IE - http://qrayg.com/experiment/cssmenus/) What is happening is my menu pops up over the top of the slideshow but while it works in Firefox, Chrome, Safari, etc, in all versions of IE (upto and including 10) whenever the mouse hits a gap in the menu the menu clears itself. So it appears that the slideshow
How to change scrolling direction of this smoothDivScroll?
Hi, I have a code here using smoothDivScroll and I want to make two buttons to change the scrolling direction to the Right and to the Left. As far as I can see the code for changing the direction is already in there, but I do not know how to add a button.... This is the code: <!doctype html> <html> <head> <meta http-equiv="content-type" content="text/html;charset=iso-8859-1"> <title>Lab page - jQuery Smooth Div Scroll - Thomas Kahn</title> <meta charset="utf-8"> <!-- the CSS for Smooth
warnings with jquery 1.8
i hav a webapplication which uses jquery 1.7.2. i upgraded todo to 1.8 and in a special configuration of my application i have issues with jquery. i am testing with FF 14.0.1 on ubuntu 11.10. on loading i get a warning that a script is not responding: jquery.js:4980. i click on continue executing the script and my application works. when i reload my application again i get the same warning but the issue of jquery seems to be on a different place jquery.js:4865. and when i reload again: jquery.js:2299
using the .click() to slide toggle 2 divs
<script type="text/javascript" src="jquery-1.8.0.js"> $(document).ready(function(){ $("#edit").hide(); $(".show").click(function(){ $("#info").slideToggle("slow"); $("#edit").slideToggle("slow"); }); }); </script> As you can see, I have two divs with ids "info" and "edit" respectively and a button class called "show". Initially the #edit is hidden. Now on clicking the button, I want #edit to be shown and #info to be hidden. The code seems legit to me. I really don't understand why this isn't working.
Problem jQuery scroller script
Hey, I'm quite new to jQuery, and i have a question about a script I'm using. I'm using the following script to make a div stay on top of the page when it hits the top. This works. <script>function moveScroller() { var a = function() { var b = $(window).scrollTop(); var d = $("#scroller-anchor").offset().top; var c=$("#scroller"); if (b>d) { c.css({position:"fixed",top:"0px"}) } else { if (b<=d) { c.css({position:"relative",top:""}) } } };
How to Lazy Load div background images
Hello. As many of you know it is widely used to lazy load images. Now i want to use this as lazy load div background images. How can i do that ? I am currently able to use http://www.appelsiini.net/projects/lazyload that plugin So i need to modify it in a way that it will work with div backgrounds Need help. Thank you. The below part i suppose lazy loads images $self.one("appear", function() { if (!this.loaded) { if (settings.appear) {
dataSelector breaks with 1.8
Just a warning to anyone using the popular dataSelector library, it breaks with jQuery 1.8.
.click(.. doesn't work on some IE9? any solution?
I have code like below, but it seems the .click part doesn't work on some IE 9, any idea? how to solve it? thanks $('#M1_M2_M3_B_Z_wp_wph_pl_lpc_hr_gv1_ctl03_field_id_hr_button').click(function(event) event.preventDefault(); loadPopup($(this),...
[jQuery] animate two divs for a slide up effect
Hello, I am trying to animate two divs for a sliding effect. The div currently being shown in the window slides up as it should but the following div just appears without the animation. The code is: $('#np_current').css('overflow', 'auto'); var curHeight = "-"+getHeight($('#np_current')); $('#np_current').css('overflow', 'hidden'); $('#np_current').animate({'marginTop': curHeight}, 1000, function() {$(this).hide()}).removeAttr('id').attr('id',
How to get current element when right click mouse? thanks
I bind a context menu like below, I am wonderring how to get the element where the user right click on? $(doucment).bind('contectmenu',function(e){.... thanks
Help with centering a slideshow
Hi, I am trying to use a Jquery slideshow plugin for my website and I can't figure out why the slideshow looks centered in one browser but not in another. For example in IE9 the slidshow is in the wrong position but in google chrome it looks fine. Can someone help me out? The website can be found here http://terpconnect.umd.edu/~cmccrea/Home.html and you can take a look at the source code. I think the problem lies somewhere in here... <style type="text/css"> /*** set the width and height to
Passing a variable (object) to the .on() function
I'm trying to bind an event handler for certain elements; past, present, and future (like the deprecated .live() function). I understand I can do this: $(document).on('click', 'input.clickable', function(){ // blah blah }); Where 'input.clickable' is a selector string. I'd like to be able to pass in an actual jQuery object instead, like this: var fancy_input = $(something).find('input.clickable'); $(document).on('click', fancy_input, function(){ // bloo blah blah }); It looks like that's
Appending meta tags in header
JQuery n00b here, any help appreciated. I have a client who is very fussy about the order of her meta tags in the <head>. She wants a series of meta tags to appear right after <meta name="description" content="some stuff here"> rather than down toward the end of the <head> where the WordPress theme outputs it by default. Is there a way to do this in jQuery? Find the meta with name description (regardless of content) and after that tag closes, append some other tags? BTW, arguing the merits of why
i get the same id
I've 3 div. each one has a different id, when i try to right-click on one of this div and then on another I get always the same id in the console log. Why? $("#container").children("div").mousedown(function(event) { switch (event.which) { case 3: // RIGHT CLICK console.log(this.id); break; } });
get the div id from its contextMenu
$(function(){ $.contextMenu({ ..... ..... items: { "id": {name, this.id, icon: ""}, ..... this.id doesn't return the div id.
Issue with entire table being clickable instead of a single row within a WEBGRID in MVC3
I have changed my application to incorporate a frontend changes. I have now created tables and within these tables, i have @RenderBody() When my webgrid shows upon my screen, the entire screen becomes clickable instead of just the individual rows within the WEBGRID. Here is my VIEW for the WEBGRID: @{ var grid = new WebGrid(Model, rowsPerPage: 5, defaultSort: "projectStatus"); } @using (Html.BeginForm()) { if (ViewBag.userTypeID == null)
Fix page
Hi, this one is not about fixing the toolbars, but about fixing the complete view. I do have a list view with a fixed header - works fine. What I would like to solve: the user could pull down the complete page including the header and the content. The user has to scroll to the top of the list and then pull down the list again - now I would expect that the list shows some empty space (or a reload area) but not that he pulls down the complete view showing a black background. This is very unusual on
Change css on current URL
Hello, I have one CMS with fixed layout. In that I have make few changes depends on my current URL. If I am on my home page so This class given below is div.layout-column.column-main.with-column-1.with-column-2{ width:790; } And If I am of some other page so this same class look like this. div.layout-column.column-main.with-column-1.with-column-2{ width:790; } I have tried it but it's not working properly. <script> if (location.href.indexOf("example.com") == 1) { document.write("<style>" +
Need help returning value
Hi, I'm having a hard time figuring out how to return a value to a div. I have made this "like" script, so people can press a link, to like an article. (I call it stab instead of like - just fyi) The link is like this: <a href="stab.php?id='.$r['aid'].'" class="stabit" title="Stab it!"> This is my script: <script type="text/javascript"> $("a.stabit").click(function(event) { event.preventDefault(); $.get($(this).attr("href"), function(data) { $('#stabs_value').html(data); }); }); </script> That calls
get page and explode
Dear people , i am making a chrome extension and i need to explode this : <a href="http://www.one2xs.com/profiel/bekijk?gebruiker={a username}" >{a u sername}</a></span><br /><span class="topic-userstatus"> i need to get that url open explode it and get the number that stand before the word post en set that to the variable that is the username that stand in the get. is their a way that i can get the username and open the url explode it en write it in the page? Thanks a lot
post xml to delphi webservice
(i'm sorry if someone write about this before) i write a SOAP webservice with delphiXE. i can connect that service delphi webclient application. here is xml data when i send and receive data; before; <?xml version="1.0"?> <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"> <SOAP-ENV:Body xmlns:NS1="urn:atmodemeplaniIntf-Iatmodemeplani"
Div fields not getting displayed due to page refresh in jsp
Hi , I have a drop down which display different div tags based onchange(showfields). When i click on the form field in the div tag, it refreshes the page and the fields disappear without showing the form validation. The fields div has a display of none, hence when i click on login without any values,page refreshes and does not show the errors messages. Stuck with this issue from long, please help!! function showfields() { var value= $("#dbform\\:databasedd").val(); alert(value); $("#fields").replaceWith($("div#"+value));
.html() adding extraneous anchor tags in Firefox14
jQuery function: $('#screen #biog').html($('#louise .biog').html()); HTML source <div class="member" id="louise"> <div class="biog"> <p>Our most recent employee, Louise will be gardening part-time and taking over our office admin tasks. She previously worked at <a href="url">Ken Bailey Garden Centre</a> at Wistow Rural Centre and for her own maintenance clients. </p></div>Bugged HTML output: <div id="biog"> <a></a> <p> <a>Our most recent employee, Louise will be
Error while calling function inside another one
I’m having a hard time trying to call functions from inside other functions: $('#edit_wgt_contact_form').modal(); //Widgets creation function createWidget(type){ $('#edit_wgt_contact_form').modal(); } The first call to "$('#edit_wgt_contact_form').modal()" works as expected but the one inside the function returns an error "$("#edit_wgt_contact_form").modal is not a function". (of course the createWidget function is being called in other part of the script). This is just an example, I'm
trouble setting custom headers
I am trying to set an "AUTH-KEY" into my HTTP Header for a GET request to our Postal Services API. I am receiving a 403-forbidden error, which suggests a problem with the key being read.(the same key works using PHP Curl, so its ok). Is it possible to set a custom header (with the AUTH-KEY) AND use jsonp??? $().ready(function() { $.ajax({ type: "GET", url:"https://auspost.com.au/api/postage/parcel/domestic/calculate.json?", headers: { "AUTH-KEY":"xxxxxxxxxxxxxxxxxxx" },
Have a JQuery Validation, Flexible for any fields, message display and validations
Hi All, I was looking for a validation with following options and as i couldn't find one with having all of them. i developed one and now sharing it with you guys. Lite Extendable and easy to add more validation rules Showing messages the way I want So I developed one which 2,5 k (Yes damn lite) can be extended using data-validate-whatever='whatevs' attr (HTML 5 format) and as it is not embedding any specific error popup/show system. You can show messages the way you like "Popup, Tooltip, inline,
Addition and Multiplication help
Hello all, Currently this script is outputting the exact mathematical calculations I need it to perform. Can someone show me how to change these from simply outputting formulas to actually executing them? Current example output: "Values added together and multiplied by the variable: 4 + 6 X 5" Desired output: "Values added together and multiplied by the variable: 50" <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml">
combine click and change for one execution
I need to execute the same code for both a link click and change event <img class="foo" name="54321" src="http://jsfiddle.net/img/logo.png" > <br><br> <select class="bar" name="12345" size="1"> <option value="0">0</option> <option value="1">1</option> </select> $(".foo").click(function() { //same code } $(".bar").change(function() { //same code } $('. foo , .bar').on('click change', function() { alert ($(this).attr('name')); }); If I click on the selectbox, I get the messagebox
drag ans drop conception
I want a drag and drag. Is it possible to do drags in two different blocks? My drag works in one direction: "ul#list li" to "ul#drop". I would also like to do: drop ul li # # ul to list I also have a problem with $. event.dataTransfer.dropEffect = "move"; Indeed it does not work. Thanks you html : <div id="container"> <header> </header> <h2>Le drag and drop avec HTML5 et jQuery</h2> <div id="texteFond"> drag me </div> <ul id="liste"> <li draggable="true" id="aaa">A</li> <li draggable="true"
Converting from HTML images to XML images
I am both learning how to use AJAX as well as trying to replace code that uses hard coded HTML images to one that will read an XML file using Jquery AJAX. My currently working HTML page is here. For leaning, I reduced the page code down to this. The AJAX code was copied from something I have working, though it is a very simple learning page. My first stumbling block is understanding what is being stored in the variable, "img": Does it contain the "imageURL", "alt" and "comment" for all of the
Next Page