DK,
There's not a good way to "click" an element. What you need to do is, extract the code that gets run when the product is clicked and put that it it's own function, instead of being in a behaviour. Then call that function from your behaviour, and also from the Ajax call.
What your really trying to do is duplicate what happens when your element not get's clicked, not actually click the element.
Make sense?
On Mon, Mar 15, 2010 at 3:21 AM, [Square Talent] Dirk Kelly <dirk.kelly@squaretalent.com> wrote:
Hi Guys.This is really a post for radiant-ecommerce, but I need a wider range of potential readers.In the interface for the radiant shop products http://github.com/squaretalent/radiant-shop_products-extnesion I have attempted to get the javascript up and going. I've been having a few teething issues and if I could get some advice that would be great.Fire the click event for first-childI'd like to have the first anchor within shop_products_list to have its click event fired after the list is repopulated, I'm having zero luck trying to find a way to do this.General FeedbackIf this code is terrible, I'd love to know about it. I'm sure I'm not hitting every best practice, but I am trying to evaluate as much existing code as I go. If you have any advice that would be great.Cheers,--
DK
Radiant CMS Dev Mailing List
Post: radiantcms-dev@googlegroups.com
Unsubscribe: radiantcms-dev-unsubscribe@googlegroups.com
Group Site: http://groups.google.com/group/radiantcms-dev/
--
Radiant CMS Dev Mailing List
Post: radiantcms-dev@googlegroups.com
Unsubscribe: radiantcms-dev-unsubscribe@googlegroups.com
Group Site: http://groups.google.com/group/radiantcms-dev/
No comments:
Post a Comment