mouseenter bubbling
HTML: <ul> <li>First</li> <li>Second</li> </ul> JS: $("ul").on("mouseenter", "li", function() { var t = $(this).text(); console.log(t); }); Why does this work? "mouseenter" should not bubble!
Can Jquery Detect How Many Lines of Text within a Div or A tag?
Can Jquery Detect How Many Lines of Text within a Div or A tag? I am attempting to have different backgrounds depending on how many lines the left navigation takes up. For example if the item in the left nav only takes up one line it will have backgroundA. If the item in the left nav only takes up 2 lines it will have backgroundB etc.. Currently I have everything with backgroundA but there are a few that are taking up two lines or three lines and I can't shorten them as that is what the customer
[jQuery] Can you improve my Bring-to-Front code?
Hi :) Fed up trying to figure out why my wonderful drag layers don't work in IE, I decided to get on with some more pretty stuff :) As we have layers fading in & out, and draggable, I reckon users will expect that clicking on a partially visible layer will bring it to front - like in desktop windows. So - well, I partially achieved it ;) You can bring a couple of layers to front, but my snippet doesn't handle the changed order well so it can't bring a previously-promoted layer further forwards. I'm
firstChild and hasAttribute
I'm starting to learn jQuery by doing examples in a book. IE 9 jquery-1.9.1.min.js I have this in my Site.master <script type="text/javascript" src="Scripts/jquery-1.9.1.min.js"></script> The jquery file is in the Scripts folder. I'm fairly sure that the jquery file is found b/c if I change it to anything but the above it will not run and have a $ is not defined. Here is my code that is not working. When I click the button on the page it hits my break point inside the click function.
REST POST call is giving 400 with JQuery ajax call
I am trying to call my spring MVC REST service and it works with a JQuery $.post but not $.ajax. The javascript shows this 400 error; 1. Failed to load resource: the server responded with a status of 400 (Bad Request) https://s3.amazonaws.com/codiqa-cdn/jquery-1.7.2.min.js 1. sendjquery-1.7.2.min.js:4 2. f.extend.ajaxjquery-1.7.2.min.js:4 3. logIntoCMS:8080/coco/:124 4. onclick And in spring it gives this error; DEBUG: org.springframework.web.servlet.mvc.method.annotat ion.ExceptionHandlerExceptionResolver
I want to run<div id="ab_c"></div> it via JavaScript HOW???
i have <head> <meta charset="utf-8"/> <title>Varis Creative Templtate</title> <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0, minimum-scale=1.0, maximum-scale=1.0"> <script src="main.js"></script> $(document).ready(function() { jg_gallery_init("#ab_c"); }); </head> <body> <div id="ab_c"> </div> </body> I want to run<div id="ab_c"></div> it via JavaScript HOW??? BODY EMPTY.
firstChild is undefined
jQuery: jquery-1.9.1.min.js IE: 9 Visual Studio 2010 I'm starting out with jQuery and am walking through a book's example but am having problems with firstChild being undefined. Here's the code: SiteMaster: <% @ Master Language="C#" AutoEventWireup="true" CodeFile="Site.master.cs" Inherits="SiteMaster" %> <! 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"> < head runat="server">
last has funny meanings (I think)
New to jQuery, I don't quite understand some things (OK, a lot of things). I have a bunch of <a>s within a <div id="myDiv"> and want to throw away the last one. My code is: try { $("#myDiv a").last().remove(); } catch (e) { alert(e); }I get an error saying that last() is not a function. So, I change line 2 to: $("#myDiv a:last").remove(); I get no error but nothing was removed. Checking out the forum, I then try this version of line 2: $("#myDiv
Div not showing in chrome
Hello, I have a div that I initially display as display:none in the html. On the first time load. But when I click a button Im trying to display the div. It only works in FF. $("#ret").click(function () { $("#loading").show(); <div align="center" id="loading" style="display:none"> <img alt="Loading..." src="/ship/ajax-loader.gif" border="0"> </div>
How can I pass parameters using JSON, Ajax and JSP?
Hi, I'm trying to use JSON to get some values from a database using Ajax, I'm working with JSP, this is what I'm doing: $.ajax({ type: "POST", url: "cutDateEvents.jsp", //data: "{cCardDropDown: document.getElementById('cCardDropDown').value, selection: 'FCDT'}", success: function(data){ var output = $.parseJSON(data); $("#cutDateTable").append(output.table); alert(output.table);
Problems with printing a webpage, contact with stylesheet gets lost?
Hi! Would somebody please help me with a printing problem? I've made a webpage in jquery (responsive, if that matters), with some css- and js-files. On any type of screen it's perfect, but when i choose to print one of the pages, either via the internet print-button or via a print-button on the page itself, the printout result looks the same as if a link to a stylesheet is broken. The results gets the same via both IE and Firefox. I'd really, really appreciate some good advice! Best regards,
Best way to load table from JSON
Hello, I would like to know what is the best solution in jQuery to load a table from a JSON response. (My table can be read or edit, with sorting, etc...) I have tried DTHMLX Grid solution, but I don't really like it. Do you know an equivalent in jQuery ? Thanks for your response. Julien.
Two instances on one page (conflict).
Below is the related script within the HTML. I'm trying to include no conflict within the script but I can't get it to work. One instance always loses it's function. Any help is much appreciated. <head> <script src="respond.min.js"></script> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js" type="text/javascript"></script> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <script type="text/javascript" src="mootools.svn.js"></script> <link rel="stylesheet"
how to add id value in tree menu
hi, how to add a id value in tree menu because my problem is to populate context menu for each menu in tree view i would be greatful if give any sample code or example Thanks Regards G.Lenin
Tree View with context menu with different menu item
I want to populate different menu item using context menu in tree view This is my tree view data: var data= [ { "id": "1", "parentid": "-1", "text": "CCA" }, { "id": "2", "parentid": "1", "text": "CCA 2007" }, { "text": "NICCA 2007", "id": "3", "parentid": "2" }, { "id": "4", "parentid": "1", "text": "CCA 2011" }, { "text": "NICCA 2011", "id": "5", "parentid": "4" } ] Here i have to show context menu based on text for example , i am right clicking on CCA 2007, Here menu
moving elements
Hi, I have a list of div like this : <div class="item" id="item1">xxxx</div> <div class="item_detail" id="item_detail1">xxxx yyyy zzzz</div> <div class="item" id="item2">xxxx</div> <div class="item_detail" id="item_detail2">xxxx yyyy zzzz</div> <div class="dropzone"></div> <div class="item" id="item3">xxxx</div> <div class="item_detail" id="item_detail3">xxxx yyyy zzzz</div> <div class="item" id="item4">xxxx</div> <div class="item_detail" id="item_detail4">xxxx yyyy zzzz</div> <div class="dropzone"></div>
How to get option id in select box using jquery ?
Hi All, Please any one help to get option id in select box using jquery ? Example if i will select same4 option i have to get one alert box it will show id of same4 option i.e 4. How we can do it .Please any one give reply <select> <option id="1" value="same">same1</option> <option id="2" value="same">same2</option> <option id="3" value="same1">same3</option> <option id="4" value="same">same4</option> </select> Thanks, Nazeer
Google Maps formatted_adress put in an array
i want to put formatted_adress(google map) in an array, but it works not, var x =0: $.each(data, function(a, b){ var degerler; degerler = new google.maps.LatLng(icerik.Yer.Latitude,icerik.Yer.Longitude); geocoder = new google.maps.Geocoder(); geocoder.geocode({'latLng': degerler}, function(results, status) { if (status == google.maps.GeocoderStatus.OK) { if (results[1]) { //now i want to put this formatted_adress in an Array var arr[x] = results[0].formatted_address; ++x; }//end Results[1] }//end
jquesy css issue
hello i have an issue related to a jquery plugin im using, plugin is nivoslider problem is on page load the slider is in the upper top off the page but when u reload the browser (firefox in this case) it is correctly positioned, can u help my positioning issue. http://www.con-cor.com/sitemap224.htm note i didnt create the page was just supposed to fix it and this got me stumped.
?Two success variables?
Hello, Is it possible to have two success variables in the ajax call? Thank You
Sequential XML filtering?
Hey all, I'm trying to sort XML data by attributes on separate lines of code, because I'm going to be inserting some if statements and more logic to the sorting (that's why I'm not just checking for all the attributes on one line). However, my code just returns empty, even though I know my XML is valid, there are items that meet the criteria, etc. Here is the snippet of code I'm struggling with: Feel free to look at the code in action here: http://ajaxtest.walletwallets.com/ajax10.php Thanks for
[FIXED] bind ajax call to click event
Hi, I came to post my question here because i'm desperate. My problem is that I need to track the slide (Up/Down) of a panel. The panel has <span> row on it, if you click on it slides up/down. here is my code: $("body").delegate('span[id^="iconReplie_"][class="openPanel"]', 'click' , function() { var id = $(this).prop('id'); id = id.replace('iconReplie_',''); console.log('click on iconReplie'); $.ajax({ type : "GET", url : getContextAppli()+ "tracePlanningOperations?"
Is there a better way to do this? Wire up/destroy events on mouseover/mouseout
I have several "widgets" displayed on a dashboard. When a user hovers over each widget, a "footer" band is revealed in which there are icons to represent options such as "refresh", "settings", "bar chart", "line chart", etc. The hiding and showing of this footer region of each widget is done with CSS. I currently use $('.widget').on('click', ...) to wire up the click events to each of the options in the footer and it works. My question is, can this be done more "efficiently" or "better"? I was
Remove link when on the same page
How do I remove only certain elements inside an tag, not all of it (like unwrap() does)? For instance I have: <div id="container"> <a href="#page1" class="link" id="page1link" onclick="return false">1</a> <a href="#page2" class="link" id="page2link" onclick="return false">2</a> </div> <div id="page1" class="page"> stuff </div> <div id="page2" class="page"> stuff </div> When I'm on page 1 (I fade out/in pages when clicking the link, so if I'm on page1 then page2 is invisible) I'd like the "1" to be
jQuery, php, MySQL without refresh
Hello all. I've found this tutorial http://www.youtube.com/watch?v=8wUu7pWBygY, that basically does what i want, but, i have a problem... this is nice for a single field validation, but, for example, if it was a registration form, with multiple fields for validation: new login, check if exists in DB or not, email, check if exists in DB or not, and more, this tutorial don't work... can anyone please point me the way to a good solution? Ideias?! :D Ty!
mouse over effect while rolling the image
Hi All, please look at this link, mouse over effect I want to do exactly this type of over effect while rolling(mouse over) on image, that shows new big image with the position of the mouse. How can i do that. Thanks in advance, Ankit
simple if else callback problem
The below script is perfectly working fine. The problem is even if the callback function is true but it's not ececuting "if (data == 'true') {" function. Advise me. <script> function SendDataemail() { $.ajax({ type: "POST", async: false, url: $("#emailsubmit").attr('action'), data: $("#emailsubmit").serialize(), success: function (data, jqXHR, textStatus) { alert(data); if (data == 'true') { //alert(data); alert("working"); $('#emailsubmit').fadeOut('fast'); } else if (data == 'false') { //alert(data);
I can't get a div to print in the center of the page!
Hi guys I have a div in my code that I am trying to print using the jQuery print element. My DIV is formated in the center but my when i pint it everything print left! This is my css code @media print { .contract { align: 0 auto; text-align: center; width: 800px; background-color: #fff; clear: both; display: block; } } What is the trick to get this div to print the same way it looks? I seems that the print functions ignores the css code completely! thanks
jquery does not work as external file!
Hello I use Jquery in this page and it woks fine. For example the calendar, price range slider.... Now I did all the HTML validations and took all the Jquery to an external file and none of the exterlans work here! For example the calendar, price range slider...You can see the script in the source: <script src="controller_js/controller_gallery_nd2.js"></script> What is going on? Howcome it only works when copy pasted directly in the page? Thank you.
Can I ajax images and store in variable?
Hello, Can I ajax all of the images in a folder and store them in the success variable? If so, does anyone have any examples? Thank You
Sliding Image is not working what's wrong in the code can anyone help
<%@ page language="C#" autoeventwireup="true" inherits="ImageSlider, App_Web_7krkr16x" %> <!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"> <head runat="server"> <title>Untitled Page</title> <link rel="Stylesheet" href="SlideImage.css" /> <script src="//ajax.aspnetcdn.com/ajax/jQuery/jquery-1.8.3.min.js" type="text/javascript"></script> <script type="text/javascript"
jquery.ad-gallery.1.2.4
Hi I am really new to jQuery and indeed building websites at all. I have been looking for a photo gallery for my current project and the one that really works for me aesthetically is jquery.ad-gallery.1.2.4. I have managed to customise it and get it to look like I want but I don't know how to get it into the page. My instinct is to 'Insert' it into the cell that I want is to appear in, however, I cant find anything in 'Dreamweaver - insert' that looks helpful. Sorry to be so very green - I am not
How to select deleted or written text
I want to tag deleted or inserted strings like "Hi guys" //original "Hi <d>guys</d>" //final in this example user tries to delete "guys" but it is just tagged. Or lets say that user adds some text to ours. "Hi guys" //original "Hi guys<i> how are you</i>" //final i also want it to be tagged like that. Is there any single way, any single possibility that i can do this.
Help me, please, to animate a tag using css data
Before, I am sorry for my (rus)English. There is a task: to create animation on the basis of data of dynamically added styles table. The decision received for evening: //1 расширить до: получать массив из классов, //2 флага удаления противоположного модификатора по БЭМУ //3 рекурсивно выводить для всех вложенных классов которые он может затронуть $.fn.animateClass = function (className, callback){ for(var StyleSheetList = document.styleSheets, i=0; i<StyleSheetList.length;
Using jQuery to loop through elements and call user-defined function
So I'm trying to use .each to iterate through an unordered list where each element has a tag. If the element has "tag1", then the element is shown on screen, if not then the element is hidden. The problem is when I used .each, for each iteration I want it to call a user-defined function typeCheck(). Case 1 index.html <a href="#" id="button">Button</a> <ul id="list"> <li class="tag1">Item 1</li> <li class="tag1">Item 2</li> <li class="tag2">Item 3</li> <li class="tag3">Item
bug JQ ? SELECT/CHECKBOX/RADIO
Hello everyone, i'm experiencing a crazy bug with JQ, with a very simple code : js fiddle test bug i use a SELECT and add the attribut "selected" on each "OPTION" one after one. the bug appear after the first run on all "option" -> the browser stop refreshing the visual i have the same bug with CHECKBOX and RADIO condition for the bug : OS : windows XP (don't try on other OS) JQ : 1.9.1 browser : FF or Chrome (works fine with opera) if i use an old JQ (1.6.4 / 1.7.2 / 1.8.3) the bug dispear. so now
Footer link color
How do i change the color of links in my headers and footers?
Is there any method to change the style of the cross domain. using jquery?
hi every one i was following the following URL to change the style of my other domain using jquery but i couldn't do so. is there any help or suggestion how to do this? very last demo is there on the given URL
how define a anonymous class?
I want to use anonymous class on my java program
Question on efficiency of script
Hello: I've just finished writing a routine to do the following: Use $.post to grab a dynamically produced php table and display it in a "group" container. The table shows 1 line for each group member, and their privileges. Use $(".grpBK_O1 select").map(function(){ to iterate through the resulting member table and grab the value of the privileges <select object. Assign values to variables that will be pushed into an array Use $.each(memberID, function() { to test and process EVERY memberID Use
Next Page