[jQuery] Re: Star Rating v2 and Half-Star (NEED FEEDBACK)
Erm.. no. What you can do is have 2 controls. 1. Dummy control to display value (split). 2. Actual control that takes an input (not split). Show/hide at your disclosure and voila! On Apr 3, 10:29 pm, AsymF <[EMAIL PROTECTED]> wrote: > Sorry, nevermind about the metadata. I just noticed it is optional. > > New questionis it possible to display the current value with split > stars but only allow whole star voting? In other words, show 3 and > 3/4ths stars highlighted and the remainder portion grayed out but on > mouseover show a full star for each one? > > On Apr 3, 4:10 pm, AsymF <[EMAIL PROTECTED]> wrote: > > > Any way to get around the need for the metadata plugin? I am trying to > > keep included scripts light. > > > On Mar 20, 3:23 pm, "Diego A." <[EMAIL PROTECTED]> wrote: > > > > For reference: The issue was relative positioning in IE. > > > I worked around it with a negative margin. > > > > On Mar 20, 6:29 pm, "Diego A." <[EMAIL PROTECTED]> wrote: > > > > > I had tried that but it didn't work reliably in IE. It was a CSS > > > > issue. But hey, I think I've fixed it, in which case the only issue > > > > with prototype B will be resolved. > > > > > Check it out:http://www.fyneworks.com/jquery/star-rating/ > > > > > On Mar 19, 10:08 pm, AsymF <[EMAIL PROTECTED]> wrote: > > > > > > Why can't the background-color value just be set to transparent? > > > > > > On Mar 16, 5:28 pm, timothytoe <[EMAIL PROTECTED]> wrote: > > > > > > > B is the more interesting path for development--that's for sure. You > > > > > > could always do both. Do B as far as you can take it, then maybe > > > > > > some > > > > > > clever solution will occur to you to get the same functionality over > > > > > > any background. > > > > > > > On Mar 16, 11:10 am, "Diego A." <[EMAIL PROTECTED]> wrote: > > > > > > > > Hi Timothy, thanks for the feedback. THAT is exactly the issue. > > > > > > > > Prototype A would work on ANY background, gradient or not, > > > > > > > without any > > > > > > > further requirements - other than 2 separate images that is. > > > > > > > > Prototype B does not require any other images, but you must > > > > > > > define the > > > > > > > background. So, if the background was a gradient, you'd have to > > > > > > > define > > > > > > > the same background image for the rating control in order for it > > > > > > > to > > > > > > > match the background it sits on (ie.: the page background). > > > > > > > > What sways me toward prototype B is that it allows for future > > > > > > > development. Stars can be easily split into sections, different > > > > > > > images > > > > > > > used, star domensions can be re-defined. > > > > > > > > Prototype A is easier to use (you don't need to think about the > > > > > > > background it will sit on), but it puts serious constraints on > > > > > > > future > > > > > > > development and customization. > > > > > > > > On Mar 15, 6:42 pm, timothytoe <[EMAIL PROTECTED]> wrote: > > > > > > > > > Would prototype A work on a gradient background? If so, that > > > > > > > > would be > > > > > > > > useful. If not, B makes more sense to me. > > > > > > > > > On Mar 15, 10:11 am, "Diego A." <[EMAIL PROTECTED]> wrote: > > > > > > > > > > To anyone else who might be interested, feel free to send your > > > > > > > > > feedback. I'm going to go ahead with prototype B for now so > > > > > > > > > the plugin > > > > > > > > > will require a background colour. > > > > > > > > > > On Mar 13, 8:45 pm, "Diego A." <[EMAIL PROTECTED]> wrote: > > > > > > > > > > > Two things. > > > > > > > > > > > 1. v2 now available > > > > > > > > > > here:http://www.fyneworks.com/jquery/star-rating/ > > > > > > > > > > - NEW: option to disable the cancel button, > > > > > > > > > > - NEW: option to make the plugin readOnly > > > > > > > > > > - NEW: ability to accept any value (anything at all) > > > > > > > > > > > 2. half-star prototypes now available > > > > > > > > > > There are 2 ways of doing it, I need your feedback. > > > > > > > > > > > Prototype A: Using 2 new half-star images (star-left and > > > > > > > > > > star-right)http://www.fyneworks.com/jquery/star-rating/half-star-A/ > > > > > > > > > > PROS: works on any background > > > > > > > > > > CONS: needs extra images > > > > > > > > > > > Prototype B: Uses CSS to slide part of the star out of view > > > > > > > > > > (no extra > > > > > > > > > > images)http://www.fyneworks.com/jquery/star-rating/half-star-B/ > > > > > > > > > > PROS: can be easily divided into smaller pieces with CSS > > > > > > > > > > CONS: needs background colour > > > > > > > > > > > So, which one should we use?
[jQuery] Autogrow textarea for Jeditable
I made a new custom input for Jeditable. It uses Chrys Baders excellent Autogrow plugin. Even custom input is only few lines of code I wrote a small tutorial to show how it was built. http://www.appelsiini.net/2008/4/autogrow-textarea-for-jeditable Also separate demo here: http://www.appelsiini.net/projects/jeditable/custom.html Tested with main browsers, but I would appreciate all testing and feedback :) Thanks! -- Mika Tuupola http://www.appelsiini.net/
[jQuery] get next item of sibling relationship unknown (was: first child of type form control)
Richard, Thanks for your fantastic advice on my "next" problem. I realise that the way I initially asked the question I didn't explain the requirement in enough detail. Here's my challenge: - I have a valid xhtml document that contains a tag. I don't know where this tag will appear, it may be in a form, it may not. - There will be instances (I don't control the doc gen) where multiple tags appear - in some cases, the page will include objects with class="scrollTo" AND class="errorState" The script does two things. 1 - If exists class="errorState" then scroll the page down to the first instance of errorState. Else scroll page to first instance of class="ScrollTo" 2 - Starting from the point the page has been scrolled to, continue down the document and set the focus to the next instance of a form input widget (any, could be radio, check, textarea, text, select etc.) The problem I have is I can't know ahead of time the sibling relationship between the first instance of error or scroll and the form input object. Currently I have the following: $(document).ready(function() { // scroll to the first instance of ".errorState" if exists otherwise scroll to ".scrollTo" var $scrollTarget = $('.errorState'); if($scrollTarget.length > 0) { $.scrollTo('.errorState', 1000); $('.errorState').findNext(":input").focus(); } else { $.scrollTo('.scrollTo', 1000); $('.scrollTo').findNext(":input").focus(); } }); The scroll is working but the focus only works intermittently Thanks :-) Dug
[jQuery] Re: storing jquery object in array
with dom elements that actually exist, your example works fine. perhaps there is a problem elsewhere... On Apr 3, 8:19 pm, ScottBruin <[EMAIL PROTECTED]> wrote: > Please pardon my poor understanding of javascript basics: > > I've been using the following method to create an object array of > variables: > > $.searchfunction = { > searchbox: $('#searchinput'), > url: 'http://localhost', > targetdiv: $('#results'), > specifierobj: {}, > keyboardid: '#keyboard' > }; > > I'm having trouble with getting the value of > $.searchfunction.searchbox. I'm calling it in the following manner: > > var curval = $.searchfunction.searchbox.val(); > > This isn't working--I tested this attempt with val() in Firebug and it > does not work. I've noticed that if I type in $('#searchinput') in > Firebug, the object is different than $.searchfunction.searchbox. > > Respectively, > > >>> $.searchfunction.searchbox; > Object length=0 context=document selector=#searchinput > > >>> $('#searchinput'); > Object 0=input#searchinput length=1 context=document > > I know there are jQuery objects and other types of objects, so I am > assuming it is a problem with this but I don't understand why the > variable does not store the #searchinput in the same manner. > > Thanks for any help.
[jQuery] Hover flickers when mousing over select box
http://patterntap.com/hover-test.html Check out the URL above for the test case. The flicker happens in all browsers (IE 7, Firefox and Safari). The "showonhover" appears on when the parent div is hovered over. Inside "showonhover" is a SELECT box. When I try to select an item it causes the entire hover area to flicker. Any thoughts on why this is happening and how to fix it?
[jQuery] Superfish first two tiers horizontal, third vertical - with current, problem
Hi All, I am using the awesome: Superfish v1.4.1 - jQuery menu widget and working on getting the default 2tier horizontal, 3rd vertical from: http://users.tpg.com.au/j_birch/plugins/superfish/richard-willis-example/ Which is awesome, and I have implemented the "show path to your current page" addition from here: http://users.tpg.com.au/j_birch/plugins/superfish/all-horizontal-example/ Now, the problem is, if you have the second tier as current, it will always show your third tier, which is an issue. i am assuming, the best thing to be would be to create a new function to check if the top & second tier are "current", and hide the third tier until rollover? If anyone could help suggest anything I would really appreciate it. I applied some classes in the CSS to hide it , but as soon as you rollover, it reverts to showing (which makes me understand it needs to be a function... i think =) Any consideration/pointerswould be greatly appreciated. Thanks! Ryan
[jQuery] Jquery plugin for topology diagrams
Hi All, I'm looking for a jQuery plugin for interactive topology diagrams. Topology diagrams provide an easy to use interface and simple navigation tools by providing a drill down approach to individual objects from higher level objects. I looked in jQuery plugins website and googled but couldn't find any. Please let me know if you know of anything opensource/commercial related to this. Let me know if you know of any javascript library with these features even if outside jQuery. Thanks in advance, Siva. -- View this message in context: http://www.nabble.com/Jquery-plugin-for-topology-diagrams-tp16486606s27240p16486606.html Sent from the jQuery General Discussion mailing list archive at Nabble.com.
[jQuery] Re: undeclared properties reporting values (attempting a toggleClass function)
...is it simply not possible to find out if a css property has been explicitly set? One approach I came up with for my project that wouldn't be very portable would be to use .data to assign a string of set values to a custom attribute, say: // user event handling, etc etc, then... var myProperties = $(this).data(); // s.replace to check if property is already in the string, and if not... $(this).css(property,value); $(this).data("properties",myProperties+"|property:value"); and after applying a few different properties you might get something like: do your eyes hurt yet? which also has the attributes applied as css property:value. but surely, surely someone can think of something better than that. On Apr 3, 5:08 pm, hedgomatic <[EMAIL PROTECTED]> wrote: > I'm trying to do the following: > > > $(document).ready(function(){ > $.fn.toggleCSS = function(property,value) { > return this.each(function(){ > var p = $(this).css(property); > if(p) { $(this).css(property,""); } else { $ > (this).css(property,value); } > }); > } > $("#testme").click(function() { //let's test out our function... > $(this).toggleCSS("font-weight","bold"); > });}); > > > > > in this case, p returns as '400'. > > .css() seems to always return default values, even if I don't declare > them explicitly. Even if the button in question is a span. Originally > I thought this _wasn't_ the case, as I've run into problems with > jQuery trying to set values for properties that haven't been > previously declared. > > I'm guessing my approach to this function is probably not going to > work. Any suggestions? > > -adam
[jQuery] Internet Explorer Caching Form Values on Page Refresh
I am the author of a plugin which places example text in form inputs that disappears on user focus (http://plugins.jquery.com/project/ example). I recently received a bug report describing the fact that refreshing a form in Internet Explorer 6 and 7 will reload input values without re-applying any CSS classes (which my plugin relies upon). This behaviour exists in other browsers such as Firefox and Safari but is avoided by clearing such values on page unload: this method does not work with IE, however. Does anyone know how to prevent IE from caching a form input value? If not, perhaps someone knows *when* IE caches such value as it seems like it may be before unload is called. I've tried setting autocomplete="off" dynamically but to no avail. Any help would be greatly appreciated.
[jQuery] Re: undeclared properties reporting values (attempting a toggleClass function)
here's what I came up with. This probably won't help in scenarios where you need actual html wrapped around the element vs. css, but arguably even if you're doing a CMS or something, you could easily just pull the whole thing with .html and it's a heck of a lot nicer than your average myspace editor / frontpage / etc for things like bold and italic, simple toggles work fine, that was never my issue, so... isBold{font-weight:bold;} make me bold! and me! $(".button").click(function() { var setName = $(this).attr("ID"); $(".elementSelected").each(function() { $(this).toggleClass(setName); }); }); The problem came in when I wanted to set properties that have a range of values other than on/off, such as font-family, font-size, etc, which I solved like this: function setRangedProperty(rProperty,rValue) { alert(rProperty+rValue); $(".elementSelected").each(function() { $(this).css(rProperty,""); $(this).css(rProperty,rValue); }); } I'm frustrated I can't explain why the function isn't recognized if inside a $(document).ready(function(){ });, even if you wait for the page to fully load. This will probably cause some issues for overly eager users that I haven't been able to replicate yet. anyway, relevant html: 6 8 9 etc oddly we don't need to declare px in the value, as it's appended by default. Only if you want em, etc we can of course also do: Arial Helvetica Helvetica etc and on and on. User hits Save, we do var saveHTMLContents = $("#display").html(); // upload to db, write to flat file, etc. and bob's yer uncle. On Apr 3, 5:08 pm, hedgomatic <[EMAIL PROTECTED]> wrote: > I'm trying to do the following: > > > $(document).ready(function(){ > $.fn.toggleCSS = function(property,value) { > return this.each(function(){ > var p = $(this).css(property); > if(p) { $(this).css(property,""); } else { $ > (this).css(property,value); } > }); > } > $("#testme").click(function() { //let's test out our function... > $(this).toggleCSS("font-weight","bold"); > });}); > > > > > in this case, p returns as '400'. > > .css() seems to always return default values, even if I don't declare > them explicitly. Even if the button in question is a span. Originally > I thought this _wasn't_ the case, as I've run into problems with > jQuery trying to set values for properties that haven't been > previously declared. > > I'm guessing my approach to this function is probably not going to > work. Any suggestions? > > -adam
[jQuery] Changing action of form with jquery
Hello everyone First post, please be gentle I need to have a search form that sends the variable to search to one of two places based on whether or not someone clicks a radio button. It's like tick here to only search for courses button in a search from on a website. The two searches are in different places, different technologies, so I need to change form variables based on the radio button being selected or not. Can anyone point me in the right direction of how to do this with jquery? I have no experience of JS or JQuery so it looks a bit daunting at the moment. Any help, greatly appreciated.
[jQuery] Cycle - per slide settings
Hello, Is there a way in the jquery.cycle plugin to set settings for individual slides? For example - set a different transition or timeout for each slide. Thanks in advanced
[jQuery] changing names of input in IE - advanced
Hello, when creating simple script to add inputs dynamic i have found bug in IE. Inserted name of input is not visible when using html() function. Of course in FF is working perfect. very simple example: http://eduteka.pl/testJQ/
[jQuery] Re: jCarousel - previouse and next arrow problem
Hi, after much fiddling, i figured out that in Mozilla the jquery.jcarousel.css gets rendered last (or has priorit) and the classes that relate to the buttons in the mentioned file did not have the image declaration as that resides in the skin.css file hence the images for the arrows were not showing even though the alignment and even the click event for the image containing divs were working fine. so basically i move the following lines over into their respective classes in the jquery.jcarousel.css and it worked: background : transparent url(../skins/tango/next-horizontal.png) no- repeat 0 0; into the .jcarousel-next class AND background : transparent url(../skins/tango/prev-horizontal.png) no- repeat 0 0; into the .jcarousel-prev class it is a very weired behaviour of Mozilla but at least i got it right. as for IE, it doesnt care in which one of the files mentioned the image declaration resides. thanks for trying to help anyways. ciao. On Feb 27, 6:35 pm, FishNYC <[EMAIL PROTECTED]> wrote: > it prob has something to do with the width of > > .jcarousel-skin-tango.jcarousel-container-horizontal > > and > > .jcarousel-skin-tango.jcarousel-clip-horizontal > > I struggled with that for a while before I got the right numbers to > get them to no be pushed out of view. > > Also I see you commented out this stuff... did you not want the > rollovers to work for your buttons? > > /*.jcarousel-skin-tango.jcarousel-next-horizontal:hover{ background- > position : -32px 0; } > > .jcarousel-skin-tango.jcarousel-next-horizontal:active{ background- > position : -64px 0; } > > .jcarousel-skin-tango.jcarousel-next-disabled-horizontal, > .jcarousel-skin-tango.jcarousel-next-disabled-horizontal:hover, > .jcarousel-skin-tango.jcarousel-next-disabled-horizontal:active > { > cursor : default; > background-position : -96px 0; > > }*/ > > On Feb 26, 5:27 am, "TALORLIK" <[EMAIL PROTECTED]> wrote: > > > > > Hi, > > > I've posted 3 times to the group but got no answers at all. > > >Pleasei really need help with this. > > > Basically in IE7 i got it to work perfectly but in FireFox Mozilla the > > arrows don't show. I've tried a million and one things including changing > > the arrow images to gif but it still doesn't work. > > > I'm attaching just the modified CSS files, the HTML page and the two new > > images, i assume you have the rest. i.e. the js files. > > > Thank you in advance, > >Tal. > > > P.S. im using the tango skin (you can also see in the code but just in > > case). > > > skin.css > > 5KDownload > > > next-horizontal.gif > > 1KViewDownload > > > prev-horizontal.gif > > 1KViewDownload > > > jquery.jcarousel.css > > 1KDownload > > > [jcarusel_test.html]147 > > > « PrevScroll 1 item per clickScroll 2 items per clickScroll 3 items per > > clickScroll 4 items per clickScroll 5 items per clickNext »- Hide quoted > > text - > > - Show quoted text -
[jQuery] Re: malsup cycle plugin renders vertically on page load.
Brilliant. Thanks so much. Matt On Apr 3, 5:15 pm, "Mike Alsup" <[EMAIL PROTECTED]> wrote: > > I'm pulling the content for the cycle plugin dynamically. Frequently > > it will be rendered vertically, before constructing the actual > > horizontal carousel. > > The vertical rendering is how things look on your page before Cycle > has a chance to do its thing. You can fix this by using css to hide > all slides but the first. > > div.feat-cont-item + div.feat-cont-item { display: none } > > Mike
[jQuery] Re: Post Form target into iframe, are there any events triggered?
Just change the width and height of the iFrame from 0, say 500x500... On Mar 3, 5:01 am, "Mike Alsup" <[EMAIL PROTECTED]> wrote: > > Is there an easy way to tell that the iframe has been loaded (e.g. some > > event that gets fired) ? > > I am able to poll the frame, catch the cross domain permission exception, > > etc > > but it seems a bit messy. > > Trap the load event for the iframe: > > var f = $('#postFrame')[0]; > f.attachEvent ? f.attachEvent('onload', onFrameLoad) : > f.addEventListener('load', onFrameLoad, false); > ... > > function onFrameLoad() { > // do stuff > > };
[jQuery] File Uploads with Form Plugin
Hi, I have jQuery 1.2.3 and the Form plugin 2.07. I don't know if I'm doing some wrong here, my PHP code seems fine but here's the problem. If you just upload an image (don't fill OR fill in the text fields) it seems to skip all my PHP validation and just reload the page into the output DIV on success. Now this isn't right and I don't know why. {literal} $(document).ready(function(){ $('#uploadForm').ajaxForm({ beforeSubmit: function(a,f,o) { o.dataType = 'html'; $('#uploadOutput').html('Submitting...'); }, success: function(data) { var $out = $('#uploadOutput'); $out.append(''); } }); }); {/literal} ALT Title: Description: Tags: Image: Upload if($p[0] == 'go' && isset($_POST['upload'])) { echo 'here1'; if($_POST['alt'] != '' && $_POST['description'] != '' && $_POST['tags'] != '') { echo 'here2'; if(is_uploaded_file($_FILES['imupload']['tmp_name'])) { var_dump($_FILES); if($_FILES['imupload']['type'] == 'image/jpeg' || $_FILES['image'] ['type'] == 'image/png' || $_FILES['image']['type'] == 'image/gif' || $_FILES['image']['type'] == 'image/pjpeg') { $filename = $this->_make_unique_file(10) . '.jpg'; $new_path = $path . 'raw\\'; $size = getimagesize($_FILES['imupload']['tmp_name']); if($size[0] >= 320 && $size[1] >= 240) { if(!copy($_FILES['imupload']['tmp_name'], $new_path . $filename)) { unlink($_FILES['imupload']['tmp_name']); throw new Exception; } $desiredw = 100; $desiredh = 75; include(FRAMEWORKPATH . 'im/controllers/image.php'); $image = new image($new_path, $filename); if($image->handle) { $image->resample = true; $thumb = $image->resize_image(100, 75); $output = $image->create_file($thumb, $path . 'thumb\\', $filename); //$output = $image->output_image($thumb); $output = $image = null; echo 'Success'; } else { echo 'Error - problem opening image'; } } else { echo 'Error - image too small'; } } else { echo 'Error - upload an image'; } } else { echo 'Error - fill in the fields'; } } else { echo 'Error - fill in the fields'; } } else { echo 'here'; $this->smarty->display(FRAMEWORKPATH . 'im/templates/upload.tpl'); }'+ data +'
[jQuery] Re: Cycle - per slide settings
> Is there a way in the jquery.cycle plugin to set settings for > individual slides? > > For example - set a different transition or timeout for each slide. You can change the timeout in the 'before' callback, but changing the transition is quite problematic. $('#slideshow').cycle({ before: function(currSlide, nextSlide, opts) { // change timeout for first slide var index = $(this).parent().children().index(this); opts.timeout = index == 0 ? 5000 : 3000; } });
[jQuery] Re: storing jquery object in array
You're probably assigning to searchbox before the #searchinput element exists: $.searchfunction = { searchbox: $('#searchinput) } // empty jQuery object because hasn't been created yet console.log ($('#searchinput')); // one element in jQuery object console.log ($.searchfunction.searchbox); // no elements--you aren't re-running the query, just using the failed one from earlier Solution: put the initial assignment in a $(document).ready function, so it won't be assigned until the entire DOM is available. On Apr 3, 7:19 pm, ScottBruin <[EMAIL PROTECTED]> wrote: > Please pardon my poor understanding of javascript basics: > > I've been using the following method to create an object array of > variables: > > $.searchfunction = { > searchbox: $('#searchinput'), > url: 'http://localhost', > targetdiv: $('#results'), > specifierobj: {}, > keyboardid: '#keyboard' > }; > > I'm having trouble with getting the value of > $.searchfunction.searchbox. I'm calling it in the following manner: > > var curval = $.searchfunction.searchbox.val(); > > This isn't working--I tested this attempt with val() in Firebug and it > does not work. I've noticed that if I type in $('#searchinput') in > Firebug, the object is different than $.searchfunction.searchbox. > > Respectively, > > >>> $.searchfunction.searchbox; > Object length=0 context=document selector=#searchinput > > >>> $('#searchinput'); > Object 0=input#searchinput length=1 context=document > > I know there are jQuery objects and other types of objects, so I am > assuming it is a problem with this but I don't understand why the > variable does not store the #searchinput in the same manner. > > Thanks for any help.
[jQuery] Re: File Uploads with Form Plugin
> I don't know if I'm doing some wrong here, my PHP code seems fine but > here's the problem. If you just upload an image (don't fill OR fill in > the text fields) it seems to skip all my PHP validation and just > reload the page into the output DIV on success. Now this isn't right > and I don't know why. What happens if you submit the form with JavaScript disabled? Do you get different results from the server?
[jQuery] Re: File Uploads with Form Plugin
OK I feel a bit silly now but it turns out are not submitted when a file is uploaded. I've used a hidden field instead and it now works. I don't know if it's a Firefox issue or part of the spec. The button gets submitted when you don't upload an image. So weird! On Apr 4, 12:32 pm, NickUK <[EMAIL PROTECTED]> wrote: > Hi, > I have jQuery 1.2.3 and the Form plugin 2.07. > > I don't know if I'm doing some wrong here, my PHP code seems fine but > here's the problem. If you just upload an image (don't fill OR fill in > the text fields) it seems to skip all my PHP validation and just > reload the page into the output DIV on success. Now this isn't right > and I don't know why. > > > script> >