Scriptaculous effect on Element.insert?

1 Answer

Answer :

answer:Assuming that you only want to highlight or blind down (or any other effect that you desire) only the content you’ve inserted and not the whole ‘activity’ object, then I think you’ll be faced with 2 different answers depending on what you want to do. In the case of Highlight, I don’t think it’s requisite that you have a block element (I could be wrong, however) so what I would do is wrap your response text within a span tag, perhaps with a randomly generated id, and call Effect.Highlight after the insert: $(‘activity’).insert({ top: ’<span id[equal]“newText”>’+transport.responseText+’</span>’ }); new Effect.Highlight(‘newText’); If you want to do a blind down, slide down, etc. you’re going to need to place your new text within a block element (I’d use a div). The downside to this approach is that if the new content you’re loading into the page isn’t an entirely new paragraph, it’s not going to look too pretty: $(‘activity’).insert({ top: ’<div id[equal]“newText” style[equal]“display:none;”>’+transport.responseText+’</div>’ }); new Effect.BlindDown(‘newText’); Hope that helped!

Related questions

Description : How do I make an HTTP request in JavaScript?

Last Answer : There are several ways to make an HTTP request in JavaScript, and the choice of which to use depends on the type of request you need to make and whether you want to use modern standards or not. ... .data)); Which option you choose will depend on your needs and which browsers you need to support.

Description : How to add 2 buttons that do 2 things in JavaScript?

Last Answer : Can you share some code? Can probably get you on the right track here. To start, I'd double check whatever you're using to target the form and make sure it's right. Some common things might be ... sure it's not shared between both and make sure you're calling the right target for the right button.

Description : How to make a javascript code between shortcodes showing in Wordpress?

Last Answer : answer:My guess is that Wordpress is stripping the javascript out. I found this: http://codex.wordpress.org/Using_Javascript

Description : Anyone here who is a good JavaScript coder or can recommend someone who is?

Last Answer : PMing you, @ETpro.

Description : Do you know a website where an option selection list shows you a popup or lightbox of each option onMouseover or onSelect?

Last Answer : Can’t you invoke a Javascript function with onmouseover and onmouseout?

Description : Why is drag-and-drop image upload not implemented more often on websites?

Last Answer : answer:When you let people upload to your server there are always security risks, but as far as I know there are no extra security problems with the system you mention. At a guess, I'd say ... but IE also has problems some times understanding even the most basic of HTML code, so no surprises there.

Description : Why Won't My Lightbox Light Up in IE?

Last Answer : What version of IE is it?

Description : How to connect to the server on the chatroom on your website?

Last Answer : answer:This is the Blogger Chat Box: http://blog.chatroll.com/how-to/add-a-free-blogger-chat-box-widget-to-your-blogspot-blog You will have less control over the specs, but it would work :D Hope this helps.

Description : How can client-side Javascript determine the iOS version of an iPhone?

Last Answer : This sums up the atate of the art pretty well.

Description : Best books for learning ActionScript?

Last Answer : read the adobe manual here. Not joking. If you know how to program already, this will be the most complete explanation. Plenty of inline go samples as well.

Description : How do I get MySpace music to play on Camino?

Last Answer : I think you can’t do it.

Description : jQuery or Mootools?

Last Answer : DOMAssistant ;-) Seriously, though, it's pretty much impossible to answer your question unless you tell us more. Specifically, what is/are your use case(s)? What are you trying to do that you want ... What do you value in a library (e.g., comprehensiveness? smallest possible download? ease of use?)?

Description : Is Google Docs developed by JavaScript?

Last Answer : It is developed in Javascript.

Description : My JavaScript code doesn't work in Firefox?

Last Answer : Frames…haven’t seen those in a long time.

Description : Does Javascript support conditional if/then regular expressions?

Last Answer : Javascript is an ECMA language whose regex implementation sadly doesn’t include the conditional syntax. Here’s a very thorough reference chart in case you’re curious about other implementations.

Description : Why is jQuery so much more popular than Prototype and Scriptaculous?

Last Answer : Some reasons off of the top of my head: 1. It is smaller 2. It is faster 3. It is easy to extend (plugins and such) 4. It is true to javascript. Prototype is like a ruby-ized javascript

Description : Insert an element at a given position in a Python list -Web-Development

Last Answer : answer:

Description : Write a program to create a vector with five elements as (5, 15, 25, 35, 45). Insert new element at 2nd position. Remove 1st and 4th element from vector.

Last Answer : import java.util.*; class VectorDemo { public static void main(String[] args) { Vector v = new Vector(); v.addElement(new Integer(5)); v.addElement(new Integer(15)); v.addElement(new ... .addElement(new Integer(45)); System.out.println("Original array elements are "); for(int i=0;i

Description : What's the "(insert car model) drivers can't drive" of your area?

Last Answer : prius , anywhere

Description : Other than "insert here", I tolerate just about everyone?

Last Answer : I pity racists (I can’t hate them; imagine having been raised by racists parents…). I dislike liars. I tolerate, I like to believe, everybody. What do you actually mean with “I’m for equal rights for all (..).....anti racists”?

Description : Why don't they make credit card readers so that they read in every way you may insert your card?

Last Answer : Swiping cards has been almost completely eliminated here in MA. It’s all chip readers or Android/Apple pay. I suspect the swipe will be eliminated there soon.

Description : In other countries do they describe black people as "African (insert home country)" like they do in America?

Last Answer : In my country all black people are called “black”. “Black Westerners” for African Americans.

Description : Can I insert multiple blank rows on an excel sheet?

Last Answer : Yes. Highlight a cell, then drag it down (highlighting) for the needed number of rows. Then select insert rows. It will insert the number of rows highlighted.

Description : Why is it usually: Try to insert USB cord; turn it over. Try to insert USB cord; turn it over. Insert USB cord?

Last Answer : Right? I just had this conversation with a coworker yesterday. I’m starting to think USB stands for Unlucky Son of a Bitch.

Description : American audience (others just insert a Big Holiday?), you've spent the day with the inlaws. What are your holiday stories? Funny? Sad? Gross? Share these Thanksgiving stories with us as they unfold!

Last Answer : We didn’t go visit them but hubby calls his mother and reverts to baby talk. So do his brothers. Drives the wives crazy. And our kids laugh at us.

Description : What causes the problem that "insert" tab solves?

Last Answer : Not having the insert tab on puts you in overstrike mode.

Description : Do you think it would be a good idea for car commercials to insert safe driving tips into their commercials?

Last Answer : The purpose of commercials is not to provide a public service announcement. It’s advertising – all they want is to sell you their car.

Description : How do I use my hot keys to insert a picture into a fb comment?

Last Answer : Quick keys mess me up a lot I don't use them I usually just upload the picture to photobucket.com and use the url from there. It may seem like an old school way to do it but this way I always have ... the message bar so it's not in the message. Everyone has a system I guess. I hope that helps! :)

Description : Anyone know how to re-insert the pull chain back into a window shade?

Last Answer : You will have to turn the blind by hand as you insert the bead chain.

Description : Is there a way I can insert a code that will automatically put in a tag on Tumblr?

Last Answer : No, but Tumblr should remember your tags. Just use the auto-fill feature.

Description : Have you ever had "insert CD" message after you already did insert it?

Last Answer : answer:A dirty or faulty CD or a dirty CD reader can cause this. Clean up your act! Just kidding!

Description : How do scammers insert the change into a return address for a scammed email?

Last Answer : answer:It’s a piece of cake to write a program to run on your machine and munge email addresses. The To: undisclosed recipients: is a big red flag too.

Description : Why am I finding it so difficult to tolerate [insert word]?

Last Answer : Apathy? Stupidity? Idiocy?” Unwillingness to exercise critical thought ability? Laziness? Complacency?

Description : Can any of you tell me how to access the embedded games the good engineers at Microsoft insert into Excel?

Last Answer : From what I’ve gathered, Vista and 7 don’t have any.

Description : How do I create a simple program that will pull information from a database, insert it into a few formulas, and spit out the answers?

Last Answer : answer:Welcome to Fluther. I have only the vaguest notion of the survey that you're trying to accomplish, but I do understand data. What will serve you very well for this is a ... simple enough exercise, which will only get more complex as your understanding improves and your needs increase.

Description : How do I insert attachments (pictures) on my emails on my iPad?

Last Answer : answer:Unfortunately, you need to go to your photo, click the arrow in the upper right, click “email photo”. iOS is poor

Description : Where in the soup-making process can I insert an overnight pause?

Last Answer : answer:Yes, @Jeruba I almost always make our soup for the next day. If adding milk, I do that just prior to serving. The overnight break happens after step 4.

Description : How do you insert earplugs properly?

Last Answer : The ones i’m using are called Max foam plugs….. for the record

Description : Collective memory question: how soon do we forgive... (insert your celebrity here, and then add the time it takes, in your opinion, to forgive them).

Last Answer : answer:Not sure I’m doing this right, but here goes…. Lionel Richie. His discography. I say, we should forgive him in 2048.

Description : What's the use or meaning of Slash _ insert word _ Slash e.g /sky/?

Last Answer : back in the day of plaintext only media, we'd sometimes use /this/ to mean this (that is, in Italics). Similarly, we used underscores (these things: _ ) surrounding a word to mean underlined . But ... (like here on Fluther, for example) allow you to format your text, so such things are not needed.

Description : Which is the best choice for party invites - free ones with glued on insert or computer-printed that I have to pay for?

Last Answer : I think it's perfectly fine to use the free ones. You may have to make yourself a little jig, or make sure to put little tiny pencil dots (very lightly so you can erase or cover them the insert) when ... you don't have one, to make sure that your print-outs get cut straight. Save money when you can.

Description : If you could insert a caption/speech bubble to this image, (see details) who would you pick (on) & what would you have them saying?

Last Answer : Okay, okay….don’t all rush at once! I shall play by myself then ;¬} I think Hillary might be thinking…...“Oh god, i’m sure I left the iron on!”

Description : Why do Monday mornings, or our roads, or insert your own generic bitch of the day suck so much?

Last Answer : Havin’ a rough day, there, fella?

Description : Good shoe insert for leather shoes?

Last Answer : Unlikely. Leather isn’t the most breathable material. I have experienced the same with my leather ballet flats. When I wear leather heels or flats for a long period of time, I find myself taking them off throughout the day or night. Like if I’m sitting at my desk, I’d just slip them off.

Description : How can applescript be used to insert a YY.MM.DD date stamp?

Last Answer : answer:Here is a quick and dirty that will post the date to the clipboard. It will notify you first so it so you don't accidentally overwrite what is on the clipboard. Just hit enter and it is on your ... want. But it is a start and I am drunk and tired and haven't touched applescript in a while.

Description : Do you think you're a ? Are you? Why?

Last Answer : I've never been diagnosed with anything, but I often suspect that there might be something slightly wrong with me, if I compare my thought process and emotional means to deal with things with that of other ... bad however, as I've never had any real feedback from the many sessions I had to attend.

Description : Why does the engagement ring insert in Ring finger?

Last Answer : http://en.wikipedia.org/wiki/Ring_finger

Description : How do I insert an excel sheet into a word document VERTICALLY?

Last Answer : Does the spreadsheet have to be a spreadsheet when you paste it? That is, does it need to retain its usability as a spreadsheet ? Because if it doesn't, I'd suggest just pasting screenshots of it, ... that way, too, since you wouldn't be copying the source file, but just .JPG views of it.

Description : Why won't Word let me insert a picture?

Last Answer : Because you didn’t take it out for dinner first… Are you using Word 2007?

Description : How do you insert an equation in foxit reader?

Last Answer : You can always do a print screen in Microsoft Word and cut and past the part you want into foxit reader…that is if Foxit reader allows you to paste images into it.