Resolved - Unable to activate slideup/down from within ajax
I did a search and didnt find an answer so hopefully I can get some help. I have a page that I am using, where when a link is clicked a div on the page has its content changed based on which link is clicked. I use jquery to cause the Div to slide into existence when the link is clicked. What im trying to do now is make it so that, when an image is clicked from within the div, that it slides out of existence again. <script language="javascript"> $(document).ready(function() { $('#toggleButton').click(function()
[jQuery] How do you make text selectable when using IE browser?
Hi, We recently had our site redeveloped by a professional firm. We originally requested that users not be able to copy and paste text from our site. This has created an outcry and we would like to have text be selectable. I see that they achieved this by using jquery which I am not familiar. I believe that I have found the snippet of code that turns this ability off/on but I do not know how to write the correct code to allow selection of text. This is an IE specific issue, not a problem in Firefox.
[jQuery] some idea: jQuery ajax and URL length
Hi Internet Explorer (in particular IE6) has some limit on maximum URL length. This is very hard to debugging if you don't know what to search for. Maybe jQuery could throw some self-explaining exception when URL is too long? Regards,
[jQuery] help to simplify code
i would like to know how i could do it better this actualy repeats 3 more time to get the other mouse over states. Please dont write any code i am still learning and would be helpful if anyone could just guide me in the right direction Many Thanks $('#vision, #navvision').hover( function () { $('#services, #approach, #team').stop().fadeTo('slow', .2); $('#navigation').stop().animate({ backgroundColor: "#9e97ca" }, 500); }, function () { $('#services,
[jQuery] tooltip
I am jquery beginer, I write my project using STRUTS 2 and Jquery I'd like to know how can I add a ToolTip to some existing controller such as Date Picker, stright forward. if it looks like the below(jsp page): <%@ taglib prefix="s" uri="/struts-tags" %> <%@ taglib prefix="sj" uri="/struts-jquery-tags"%> <html> <head> <sj:head jqueryui="true"/> <title>Controllers Test</title> </head> <body> <sj:datepicker > </sj:datepicker> .... Second, What is the difference between remote and local
[jQuery] AJAX search result filtering
Hello I was thinking of having my search result filters affect data automatically without reloading the page. What would be the best approach to this? I was thinking of attaching $.post(); to each filter checkbox or dropdown to submit that elements input then have the page update the results table. Something like this perhaps: -> use post to send single filter to a page that stores it in a session ( do this whenever a filter is changed) -> retrieve all stored filters in the session, fetch results
[jQuery] (autocomplete) Issue with Plugin JQuery Dialog 1.7.2
Hi, We are using autocomplete plugin with Jquery 1.3 and Jquery UI 1.7.2. When the plugin is used with Jquery UI Modal dialog we are getting auto suggest layer behind the modal layer. We feel itz due to z-index of dialog. Please let us know if there any way fix this issue.
[jQuery] Suggestions on form validtion
Hello, I created this: http://dl.getdropbox.com/u/340087/Drops/09.20.09/form-e3ae8599-180653.html The basics are that jQuery will immediately hide a div that is the right most column. $('div.right').hide(); I have three input elements that when focus is given, I take the next() element, which is the right div, and fade that in. On blur, I take the next element, and set it back to hidden. This works well, and accomplishes what I want in as minimal code as I am able to hobble together. Next, I need
get Canvas object with jQuery - why do I get an array?
Hi there I'm playing around with the new HTML5 canvas element. var canvas = document.getElementById("canvas"); var ctx = canvas.getContext("2d"); ctx.fillStyle = "rgb(200,0,0)"; ctx.fillRect (10, 10, 55, 50); Translating that to jQuery: var canvas = $('#canvas'); var ctx = canvas[0].getContext("2d"); ctx.fillStyle = "rgb(200,0,0)"; ctx.fillRect (10, 10, 55, 50); What I dont get is, why does $('#canvas') return an array object? Why can't I just simply
Stuck with javascript not working in AJAX call
Hello, I have a webpage that uses javascript and jQuery that gets called with jQuery AJAX by another page. The javascript in the webpage works fine by itself without going through AJAX, but when the page is called through AJAX, the javascript will not execute. I'm a little baffled as to why this is happening. Any help would be extremely appreciated. Thanks, Ryan
Struggling with Autocomplete T_T
Hello, I'm working with Zend Framework , and I'm trying to implement an autocomplete, with some Json data. It's pretty hard to find an easy tutorial. So, this is how data are returned to me : {"module":"default","controller":"inscription","action":"societelist","liste":{"669":"CERCLE SAINT PIERRE LIMOGES BASKET ELITE","2266":"SPORT PLUS CONSEIL ET ORGANISATION LIMOGES","2862":"MAIRIE DE LIMOGES","3794":"USAL RUGBY LIMOGES SASP"}} as you can see, the data array are in the "liste" key. But these ones
Apply click event on div - IE prob
Hi everyone, I have 2 div with the same id, and i call a function onmouseenter. It works very well across all browsers except IE7 where the first div work but the second one does not run the function. <div id="thediv" style="style for the div 1"></div> <br/> <div id="thediv" style="style for the div 2"></div> The divs must have the same id, no matter what. Does anybody know what going on please. Thanks for any help. Jerome
Help needed - Random image fade grid
Hi all - I'm new to jQuery (and javascript) but feel that in the past week or two I'm starting to pick things up quickly. With a bit of luck hopefully someone might be able to help with my current conundrum; I'm trying to use jQuery to produce something similar to this flash example http://steftock.com/dev/example/index.html although I'd like the effect to be somewhat more controlled. In a nutshell, what I'm trying to achieve is a 3 x 4 grid of (12) images which appears to load in a random order
hide/show within UpdatePanel
I'm new to jQuery, I'm using a link which toggles the visibility of an area. This is within a .Net UpdatePanel. I've managed to get round the document.ready / pageLoad for event binding. The first line of my document ready hides the area, so the page starts up hidden, and hiding/showing works fine. BUT... if I trigger something that causes a postback the state of the area is lost. I understand why this happens... the 'hide' is in the document.ready, I can't put it in the pageLoad as I may not want
[jQuery] Variable Lifetime
Am I correct in thinking that variable in jquery are limited in scope by their parent functions, and if I want to persist data during a particular page's lifetime (thinking of a page that will exist for a while, being updated by AJAX calls, etc) I need to put it in an input control on that page - I am wanting to store data like sort-field for an AJAX updated data grid, so that data will need to be persistent and specific to that page, but I can't find any reference to global/page variables in jquery,
[jQuery] How I can add my sait about jquery in tutorials.
Hello everybody. My name is Alexander. Sorry, my English is not very well. I have one questions. I translated jQuery Api Reference on Russian (http://slyweb.ru/jquerymain/) , but I don`t know does jQuery Api Reference distributed under the terms of General Public License or not? Therefore I don`t know whether I broke law or not. In Russia law modify and translate work other authors don`t permitted without their consent. And I want to ask for you consent for further translate jQuery Api Reference
Auto-refreshing site saved in web-browser cache
Hi, I use the below code to refresh a portlet on my website: <script type="text/javascript"> function refreshMe<portlet:namespace/>() { var url = "${ajaxRender}"; jQuery("#<portlet:namespace/>nav").load(url); } setInterval('refreshMe<portlet:namespace/>();', 15000); </script> However, in Internet Explorer 8, the portlet is not properly refreshed. Instead a version saved in the cache turns up. I have tried appending some random parameter at the end of the URL using
[jQuery] jQuery AJAX call undefined error with special characters
Hi, I tried to make an AJAX call using jQuery, the data has special characters, e.g "{'data':' test'}". It seems failed to pass this data in the first place. It will work if i just pass "{'data':'test'}". encodeURIComponent and JSON.stringify failed here due to the special character "< > /". Could anyone please help with it? Thanks. $.ajax({ type: "POST", url: "services.aspx", data: "data=" + encodeURIComponent(JSON.stringify(obj)), dataType: "text", error:
Simple Function creation question
i'm very new with jQuery and find creating functions somewhat confusing. I have a simple hide/show call that effects a given div. I'm attempting to create a series of divs and links without creating individualized onlick functions within jQuery. Below is what I have. What is best way to create a function without code replication? What do you recommend? code: < <script> $(document).ready(function(){ $("#mer1").click(function () { $("#dah1").toggle("fast"); }); $("#mer2").click(function () { $("#dah2").toggle("fast");
[jQuery] getJSON returning undefined instead of XMLHttpRequest
I am using getJSON to get results from a different domain and i wanted to get _some_ object back when calling getJSON so that i can insert some variables into the callback scope. Basically, what i wanted to do was this: var new_json = $.getJSON(url, function(data) { alert (this.variable_from_caller); }); new_json.variable_from_caller = 'value'; The problem is that since url is on a different domain, the call to getJSON (which end up calling ajax) returns undefined and not an object that can be referenced
focus addClass in IE
hi there, the following works in FF but not in IE 6 nor IE 7 $('#msgsp').addClass('hidden'); $('#eventname').focus( function() { $(this).addClass('input_fields_focus'); } ); that is IE the div #msgsp is not hidden and when focus on the input box #eventname the background color aint changed are there special methods/syntax for IE? are these methods intended to work in IE? any help would be appreciated thx B
[jQuery] Can't assign jQuery jqModal to dynamically added links
I've been having problems getting jqmodal modal dialogs to display on links added dynamically by client side code. I've demonstrated the problem at the following URL: http://www.neil-burton.co.uk/jqmodaltest/index.htm jqModal plugin here - http://dev.iceburg.net/jquery/jqModal/ Any help would be appreciated
[jQuery] Convert AJAX XML response to HTML
Hi, Can someone help me with a simple requirement. I want to use AJAX where the response from server side would be an XML with root element has two divs one for status with values success or failure and other child is HTML which needs to replaced if first div is success. eg. <root> <div id="status">Success</div> <div id="response> <div> <label for="SlotsOffered" id="SlotsOfferedLabel">Number of Slots</label> <input id="SlotsOffered" name="SlotsOffered" type="text" value="1"/> </div> ..........................................
slideUp slideDown Form Help
hi all, I still pretty fresh to jquery but im making a form and i want a certain div of the form to slide down when a certain checkbox is checked and then slide back up if the check box is unchecked. I thought i had it but i cant figure out why it wont slide out. so here's the situation: So in my js file I hide the the div that i want to slide up and down so that initially, the div does not show. This much is working. $("#departureArea").hide(); Now the next thing is getting it so that when this
validate and submit, no page refresh
Hi guys, I am trying to find a particular tutorial on the web that I used to create a REALLY simple script that made use of jquery.form and jquery.validate. The script would use the simple validate command to validate inline, then when submitted, a loading graphic would appear, call upon the php script referenced in the form action, process, then spit out a message on the same page without any refresh. Can anyone point me to something this simple elsewhere? I have a few questions about modifying
[jQuery] data function
Hi, I'm trying to get the data() function working, but no success so far. Here's the code I've come up with: //$("a[href*='user.php?nick=']").data("test", true); $("a[href*='user.php?nick=']").mouseover(function() { $(this).data("test", true); }); $("a[href*='user.php?nick=']").mouseout(function() { console.log($(this).data("test")); }); After moving my cursor out of one of the selected anchor elements, i get undefined, instead of true, in my Firebug console. Any ideas?
[jQuery] jqModal problem
I'm trying to use the jqModal plugin on my page: http://dev.iceburg.net/jquery/jqModal/ Here is a sample showing my problem: http://dennismadsen.com/uploads/modalTest/ If you see this example in a IE6 or IE7 or IE8 in compatibility mode, you will see, that the the modal box is not 100% opacity. It works great in FF, IE8, Chrome and so on. The problem is because of a "position:relative;" in the "containerTop" div - the parent div of the dialog. I hope somebody can figure out what the problem is and
Multipart form using Validate + Accordion problem
Hi All, I need some pointers on what I'm doing wrong here. I followed the multipart form demo included with jquery.validate, creating a custom validation rule like so: $.validator.addMethod("pageRequired", function(value, element) { var $element = $(element) function match(index) { return current == index && $(element).parents("#fields" + (index + 1)).length; } if (match(0) || match(1) || match(2) || match(3))
[jQuery] Removing an element from Droppable with N elements triggers N times the event.
Hi all. My situation: I've a droppable div that I use for querying a database. Everytime I drag-drop an element to this droppable div, it updates the query. Following the same idea, if I remove an element from this div, it should update the query (deleting the removed element from the query). The droppable code is: $my_droppable.droppable({ accept: '.cloud > li', activeClass: 'ui-state-highlight', drop: function(ev, ui) { addTagToMyDroppable(ui.draggable); }
[jQuery] Queue event after getJSON request
I'm trying to queue to start once a getJSON request has finished but it's not working, I'm getting '...queue is not a function'. I've tried $.getJSON("http://....", function (data){ $.each(data, function(i,item){ ... }); }).queue(function(){ $("#div").fadeIn(); }); and $.getJSON("http://....", function (data){ $.each(data, function(i,item){ ... }).queue(function(){ $("#div").fadeIn(); }); }); but I get the same error. I've tried with 1.3.2 and 1.2.6.
[jQuery] jQuery Star Rating from Fyneworks
I'm trying to adapt the Star Rating method given at: http://www.fyneworks.com/jquery/star-rating/#tab-Testing. I would like to use #3-B, except that when I click on a particular rating I want the tip to permanently change to the corresponding text, instead of reverting back to the original upon the onBlur() event. Tried to hack the code (jQuery.rating.js) but have not been successful. Would appreciate any "tips" :).
[jQuery] fadeIn with IE 8 Compatibility Mode forced off
Hi, are there problems with the animation with IE8 compatibility mode forced off? I am using meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8" to force IE 8 out of compatibility mode for my site, as I need to use the new CSS support that IE 8 finally properly implements (it's an internal site, so I'm not worried about any other browsers), but I notice that in doing that the fadeIn (and Out) no longer seems to work - the content the method is being applied to just sits there for the fade duration
[jQuery] Powerfull WYSIWYG editor with upload image capability
Can any one please recommend a powerful WYSIWYG (commercial/open source) editor which has a image upload capability. I have been looking for it since morning but could not able to find it. I found CKeditor+CKFinder , but CKFinder is not available in django/ python language. I tried to port to django but encountered several problems. --rama
animation in cascade not working properly
Hello guys, Im making a simple animation with slides fading in and fading out, i did it very simply coding it like this: $(document).ready(function(){ $('.intros').each(function (i){ $('#slide'+i).fadeIn(tiempo,function(){ $(this).fadeOut(tiempo); }); }); }); But it didnt work properly, it didnt do it as expected, which is the second slide should slide in when the first already faded out, like it did
[jQuery] Some problems with rounded corners
For pages with a lot of text (and other content) I would like to have the possibility to hide and show parts of the page with 'buttons'. I have come a long way, but have some problems. I made a page to show them: http://www.decebal.nl/testing.html I have come a long way and for the most part it works. I use div's with class switch to define the blocks I want to show/hide. I then use jQuery to make those div's switchable and start with them not displayed. Look at the source to see how I have done
[jQuery] expandable divs problem
Hello As you can see on the code provided below I have expandable boxes and want some of them to be opened by default. I achieved this feature but when clicking on the heading to close the initially opened div the background of the header remain as opened and only on second click it removes the active class. But box is going to open. So I have active class heading background on not active heading. Can anyone help me with this?? You can check live demo on http://codelab.gr/dev/boote/index.html (the
Pop- Up ...
Hello all. I have a div called "test1". that is hidden by default. I click on the link called "link1", the div to display the pop-up come. (Like vbulletin forums pop-up menu ) Then, if the user, click on the destination page to another (except for any part of the content div), the hidden div to come. Can someone help me? Thanks ... !
Fade-in on scroll
Hi there, I'm currently in the design stages of developing a portfolio site and there's something I'd quite like to include in the functionality of the website. Essentially, what I want is something like Lazyload (http://www.appelsiini.net/projects/lazyload), but I would like the images to load as normal and for the divs (containing image and description) to fade in from 50% opacity as the user scrolls them into focus. Here's the layout I'm talking about: http://twitpic.com/h4d33 Does anyone know
[jQuery] Paste an image into a tag...
This may or may not be possible, but if anyone knows a way to do it, I'd love to hear from you. Basically, I simply (?) want to copy an image (e.g. from ALT-Print Screen or 'Copy Image'), and paste/drop it into an img tag on a page so it appears on the page. I can then resize, drag-drop, etc. as required. I've had a rummage around the net, but can't find anything. Maybe it's impossible? Cheers, Steve
[jQuery] Expandable div's problem
Hello As you can see on the code provided below I have expandable boxes and want some of them to be opened by default. I achieved this feature but when clicking on the heading to close the initially opened div the background of the header remain as opened and only on second click it removes the active class. But box is going to open. So I have active class heading background on not active heading. Can anyone help me with this?? You can check live demo on http://codelab.gr/dev/boote/index.html (the
Next Page