[jQuery] how to convert a string to json structure
I have a string that is like [{"carePacks": [{"businessCode":"J1PS","description":"HP 1"}],"coveragePeriod":12}, {"carePacks":[{"businessCode":"J1PS","description":"HP s"}],"coveragePeriod":13}]. can you give me some advice on how to convert it to a json structure, and how to get data from the data structure, like get "HP 1".
[jQuery] How to get css object of one element?
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"><meta name="ProgId" content="Word.Document"><meta name="Generator" content="Microsoft Word 12"><meta name="Originator" content="Microsoft Word 12"><link rel="File-List" href="file:///C:%5CDOCUME%7E1%5CNgoc%5CLOCALS%7E1%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_filelist.xml"><link rel="themeData" href="file:///C:%5CDOCUME%7E1%5CNgoc%5CLOCALS%7E1%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_themedata.thmx"><link rel="colorSchemeMapping" href="file:///C:%5CDOCUME%7E1%5CNgoc%5CLOCALS%7E1%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_colorschememapping.xml"><style>
[jQuery] ClueTip doesn't show pages from the www.
Hi Karl, Great plugin. However, I am more interested in displaying a tip brought from the web. For instance: <script type="text/javascript" src="jquery-1.3.2.min.js"></script> <script src="cluetip/jquery.hoverIntent.js" type="text/javascript"></ script> <!-- optional --> <script src="cluetip/jquery.cluetip.js" type="text/javascript"></ script> <script type="text/javascript"> $(document).ready(function() { $('#sticky').cluetip({sticky: true, closePosition: 'title', arrows: true}); }); </script> <a
[jQuery] [treeView] Problem with Firefox 3
I use the jQuery plugin treeView with jQuery 1.3.2 I have a long list (over 500 items), each item with 3 links . Exemple : <ul> <li>first item <a href="action1"><img src="icon1" /></a> <a href="action2"><img src="icon2" /></a> <a href="action3"><img src="icon3" /></a> </li> <li>second item <a href="action1"><img src="icon1" /></a> <a href="action2"><img src="icon2" /></a> <a href="action3"><img src="icon3" /></a> </li> </ul> With IE8, Opera, Safari and Google Chrome : no problem. Display the tree
Highlighting / Unhighlighting Textboxes ... Consistently!
I'm using jQuery to spruce up an existing web application. It's an ASP.Net 3.5 app. I thought a good place to start was the simple highlighting / unhighlighting of a textbox's background color when it gained focus and then lost focus. In my app I have a Master Page that is referenced by every Content Page. So I got jQuery 1.3.2 up & running from the Master Page. Here then is the code I've written to accomplish the task: function main() { $("input[type=text]").focus(textboxHighlight).blur(textboxRemoveHighlight);
[jQuery] image fadein on load
Hi, im a totally beginner so this may be obvious but im stuck!!! I have image galleries on my site and i want the images to fade in after loading, at the moment i have the following script: Code: $(function() { $("div#media-gallery ul li img").css("display","none"); $("div#media-gallery ul li img").fadeIn(2000); }); Which almost does what i want but.... A) the images very quickly load then disapper. I dont want to hide the images in css incase people have js diasbled. B) all the images load together
Safari 3.2.1 and $.ajax POST doesn't work
Hello to the ng; i have a form that should be submitted via ajax; it works of ff and ie, but doesn't in safari 3.2.1. I've simplified every page to isolate the problem: The html: <form name="form" id="richiestapreventivo" action="" method="POST" enctype="multipart/form-data"> <fieldset> <legend>Richiesta preventivo</legend> <ol id="datiazienda"> <li> <label>ragione
[jQuery] setInterval + clearInterval + wait + restart setInterval
I've been trying to think of a way to restart a setInterval after clearInterval has ran and say 1 minute has passed. Anyone have any ideas or examples on this? Here is snippet of code: if (o.auto) { sliderIntervalID = setInterval(function(){ if(u===false) {$.animate('next',true);} }, o.auto); } $('.next, .'+container+'').click(function(){ if(u===false) { $.animate('next',true); if(o.auto){clearInterval(sliderIntervalID);} } return false; });
[jQuery] Using jQuery in requested file by $.ajax
Is it possible ti use jQuery or JS in file which I get by $.ajax? For example, I have a file like this file.php: <? <div id="my_div_1"> Some text ...</div> <div id="my_div_2"> Some text ...</div> <div id="my_div_3"> Some text ...</div> .... <script type="text/javascript"></script> - use JS ??? .... $("my_container").html("Some text ..."); - use jQuery ??? ?> And I use $.ajax from main_file.php: $.ajax({ type: "POST", dataType: "html", data: "data=" + $("#container").html(), url: "file.php", cache:
Help with simple (6 line) plugin
I found this plugin online at: http://geekswithblogs.net/ignu/archive/2008/10/19/125934.aspx and its supposed to work as a filter for tables. you just do: $("#myFilter").tableFilter("#myTable"); It works just fine with just one table... but if you do a second $("#mysecondFilter").tableFilter("#mysecondTable"); then both filters will filter just the secondTable... I have no experience in writing plugins but Im sure there is an easy fix to this... anyone that has any ideas please help, heres the whole
[jQuery] Removing item from array based on property
Hello all, I have a question about removing an item from an array. I am looking to remove an item from the array based on the property. Ie. arr = [{a1: 1, a2: 2},{a1: 3, a2: 4}, {a1: 5, a2: 6}] remove first item from array because a1 = 1. I am not entirely sure how to do this. I tried messing around with grep a bit, but that didn't turn out well. Thanks
[jQuery] jqModal two overlays
I just started using jqModal as I need support for nested modals. I'm noticing some erratic behavior with nested modals and ajax, but I don't know exactly how to fix it. What happens is when I load a modal, that has a nested modal in it, I get two jqmOverlay divs, it's like it's applying the overlay for both modals, even though the nested one wouldn't have been triggered yet. Here's the code: // Main Modal $(function(){ $("#modal").jqm({ajax:'@href'}); }) <a class="label jqModal" href="/suppliers/2/edit">View
[jQuery] image preview
Hi I like jquery image preview .It looks fine .I would like some other functionality in image preview. Is that possible to preview the client image i.e. before image being uploaded to the server I need to show the image from the client machine
[jQuery] Controlling my slideshow . . .
I was recomended to come here, so I will re-enter the post I made at a vBulletin assistance site and see if my problem can be corrected using jQuery. I'm just about ready to go live with my latest and I have added a rotating type slide show hosted by Photobucket. This site will be for Ham Radio operators and they will be submitting their QSL cards that I scan and copy up to the slide show. Here's what I want to do. The text added to the vBulletin header template is this: <div style="width:100%; text-align:
[jQuery] Is it possible to select on multiple attribute values?
Hello, I already know that you can combine multiple attribute selectors, &&- style, by doing: $("*[name='someName'][value='someValue']"); However, what I was wondering is, is there any way to combine multiple attribute selectors, ||-style, such that I could select: $("*[name='someName'][value='someValue']").add("*[name='someName'] [value='someOtherValue']"); with a single select? I'm imagining a syntax of something like: $("*[name='someName'][value='someValue'||'someOtherValue']"); (but, obviously,
[jQuery] Charset in $.ajax
Is there way to change charset when I request page by $.ajax?
[jQuery] cluetip is not working in updatepanel
Who can give me an example which cluetip can work in updatepanel?
[Solved] How do I hide different items in an unordered list
Hi there, I'm fairly new with jQuery and javascript. My primary skillset is in CSS. I want to modify the appearance of an unordered list by assigning a value to each list item and then setting the custom properties for each list item. At first I was thinking of assigning a number to each list item and then controlling it's properties via that number. But now I'm wondering if jQuery can do a search for the list items content. Any thoughts on what code could do this function? Many thanks.
[jQuery] Firefox onclick problem.
Hi I'm a newbie and heres my newbie question.I can't fire my function with onclick event in Firefox.My little piece of code works perfect in IE. but in firefox it just doesn't work and no error in firebug by the way.I'm using Firefox 3.0.9 This is the code: <script type="text/javascript"> function del(mesId) { $(document).ready(function() { $("#" + mesId).hide("fast"); }); } </script> and the html; <button id="delete" onclick="del(<%# Eval("Id")%>)">Delete</button> What am I doing wrong? And thank
[jQuery] reading show/hide state
when using show() and hide(), what's the right way for the script to read the state of the element? i've found that attr('display') can be used but this seems like an undocumented hack and could fail in future releases of jquery.
[jQuery] jquery and https bug
Hi there I am working on a site that is using https. i have a toolbar using jquery but for some reason, IE6 throws an error saying 'Security Information This page contains both secure and nonsecure items ...' Any ideas on what's happening? Or how i can fix this? thanks gillian
[jQuery] Do object events persist in cloning? I can't get this method to work.
What I'm doing is creating a couple button objects and cloning them. Here is my code: $(document).ready(function() { $.fn.addOne = function() { return this; // This will do stuff once I get it it to be called } $.fn.removeOne = function() { return this; // as will this } var memberSections = $('form .member-sections'); var youngerSections = $('form .younger-sections'); var minus = $('<a>') .attr('href', 'javascript:;') .addClass('minus') .addClass('button') .click(function() { console.log('Hello');
[jQuery] Thickbox: The called page does not run JQuery in FF or chrome
I've setup a page that uses simple JQuery to fade out text when clicking a link. This page works in all browsers. However, when this page is displayed in the ThickBox popup, the link doesn't fadeout the text in firefox or chrome but does fade out in IE. Does anyone else have this problem? If you want to test this please use the code below: Default.aspx (the page that uses Thickbox and calls Test.aspx) <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title></title> <link href="thickbox.css"
[jQuery] in the dynamic accordion trigger jqmodal window
Hello: I want to populate accordions based on user selections, and within the accordion allow the user to enter more details through jqmodal. I am close to doing that here: http://pssnet.com/~devone/ajqtable/summary3998e.html But I have this issue. If the user clicks the test button outside or below the accordion, it pop ups the jqmodal. But, when I try to embed that within the accordion as a js variable. This does not work. Any help appreciated. Thanks. Regards, Nat
How to round up to 2 decimals
I can'nt ffigure out how to round up the result of division 10/3 for example and to show only 3.33 as result. Any idea?
[jQuery] Detect if drag outside of parent using jQuery UI Draggable
Hi, I am making a inner DIV to be draggable using jQuery UI Draggable. The inner DIV can only move horizonally and fit within the outer DIV (parent). I want to have some detection mechanism so that if the inner DIV moved further left or right of the outer DIV, I will show something (<< and >> arrow). Is there any way to do this? Thanks
yahoo mail type tabbed panel - plz help
Hello Guys I need to build a Tabbed panel similar to yahoo mail (latest version). means whenever i click on the link the page should be open in new tab, with closing button. is there any jQuery plugin which provides same functionality. Thanks in advance Vijayson
Calling a function from page load
Hello, I'm using this code to create a modal box: $(document).ready(function() { //select all the a tag with name equal to modal $('a[name=modal]').click(function(e) { //Cancel the link behavior e.preventDefault(); //Get the A tag var id = $(this).attr('href'); //Get the screen height and width var maskHeight = $(document).height(); var maskWidth = $(window).width(); //Set heigth and width to mask to fill up the whole screen
[jQuery] mixed media type lightbox
Hi is it possible to use light box with a range of media types grouped together? Having clicked of of a number of thumbnails, I would like to be able to use the next and back buttons to scroll though a mix of images, flash and flv/mp4/movs. Is there a plug in that would allow me to do this? Thanks
[jQuery] How to get this to work in jQ 1.3.x?
Hi there, I got a problem with jQuery 1.3.2 and IE when i use this for a menu $("#manageHome").click(function() { $("#content").css("overflow-y", "scroll"); $("#content").load("manageText.php?action=show&onderdeel=home"); }); When i downgrade jQuery to 1.2.6 it seems to work. How can i fix this? And where is a list of changes between 1.2.6 and 1.3.2 Grtz, Barry
[jQuery] [autocomplete] Search Page Replacement
Hi everyone! I'm implementing the autocomplete plugin to improve my search from as described in the documentation here: http://docs.jquery.com/Plugins/Autocomplete#Search_Page_Replacement The autocomplete plugin is correctly displaying a list of results below my search field as I need. However the topmost of these results is automatically highlighted, so if a user hits the return key the search field is updated with the highlighted result and then the form submitted. I need the list of results to
[jQuery] Please help me to create a page scroll
I have to create a page scroller like in latest version of yahoo mail list scroll. Can I create that kind of scolling effect by using js. If any body can help me please please replay me.
[jQuery] detect quicktime?
Hi All, I'm looking for a jquery plugin (or vanilla method) for detecting quicktime, so I can decide whether to embed a QT movie or not. Did some googling, but most of the methods seems really old and I didn't see any jQuery plugins dedicated to detection. Any links/advice? Thanks! - Jack
Toggle help
Hi there, I'm trying to open a div that holds several images when the user clicks on a link. Each clicked link will open the div and display a specific pic. Plus each time a link is clicked the div should close before opening the div with the appropriate pic. Since I'm new to jquery I'm a bit lost on this one. I found this bit of code but am having difficulty putting into use for my situation: $(document).ready(function(){ //Hide (Collapse) the toggle containers on load $(".toggle_container").hide();
Accodian menu not maintaining state via cookie
Hello all. Nice jQuery resource I'm using a accordian menu I found here: http://www.i-marco.nl/weblog/jquery-acc ... nu-redux2/ I'm using it on a development site here: http://www.visualtransfer.co.uk/ It's being used on the left hand side navigation which are coloured Red, Orange and Green. The menu is supposed to maintain state when you click through to the various sections, however it appears to jump between the Red, Orange and Green sections. I've cheked that the cookie is set and using the unique
Adding HTML then having it function...
Ok, the title might not be a very good title, but I'll try to explain a little better INSIDE the post Ok, so here is my example jQuery $(document).ready(function(){ $('#holder').html('<a href="#" id="foo">Hey!</div>'); $('#foo').click(function(){ alert('Working!'); }); }); Ok, so when the page loads, the div with the id of holder adds a link inside itself (with an id of foo). But when I click on the link, the alert() doesn't show up. Of course this is because the link was added after
[jQuery] long polling with jQuery
Hello, I would like to create a chat application that dosen't need a setTimeout(), so I'm starting an ajax request that give a response if there is something to display : function checkChat(){ new jQuery.ajax({ 'url' : './chat/check.php', 'cache' : false, 'success' : function(messages){ if( messages.length ){ $("#empty_chat").append(messages); } checkChat(); } }); } That's working
[jQuery] How to select one of the many forms i have
Hi all, I'm a jquery newbie. I've been searching around the web a lot, but could not find an answer. My page has multiple forms (forma, formb, formc, etc). I want to select one particular form, say formb, without assigning an id to it, just by its name itself. How can i achieve this? I've tried: $("forms[name=formb]") but it doesnt work. My actual motive is to get hold of a radio group in this form, so that i can assign a click event to it. Something like: $("forms[name=formb] myselect").click(function(){
[jQuery] How do i control window scrolling with two divs(top, bottom)
Hopefully someone can help me! :) What I want to do is control a window/div scrolling via the use of two div's. Example. 1) First div named top(#top), which will be fixed to the top 2) Second div is bottom(#bottom) which is fixed to the bottom of the window. 3) An image in a content div(#content) with is say 2000px long All I want the divs top and bottom to do is scroll up or down slowly when they are hovered? How do i find the current position of the #content div and +/-? Any suggestions?
Making a private function public
Hi, I've got a plugin which is structured as follows: (function($) { $.fn.MyFunction = function(o) { // Here we have some parameters return this.each(function() { // here we have some private functions // I want a public function here // I have been suggested the following: $.extend(jQuery(this).get(0), { MyExternalFunction : function(index) { // some internal references here } }); }; })(jQuery); So what I'm looking for is how to reference MyExternalFunction from my html script. I've tried simply
Next Page