NetTalk Central

Author Topic: My first attempt at manipulating jQuery  (Read 4845 times)

John Fligg

  • Sr. Member
  • ****
  • Posts: 361
    • View Profile
    • Ambrit Software
    • Email
My first attempt at manipulating jQuery
« on: February 27, 2012, 01:28:08 PM »
Having checked out the jQuery website in respect of the accordian menu widget and reading "the book" I thought I would attempt to change the property of the accordian menu to turn off the autoheight function.

So I put this code into the Set jQueryAccordianMenuOptions embed point in the PageHeaderTag form:

 loc:options = CHOOSE(loc:options='','',clip(loc:options) & ',') & 'autoHeight: False'

However when the code runs the menu does not give the desired results. In fact the accodian menu has stopped working! Please see attached.

I do not think the syntax is worng so what could I be doing wrong?

Thanks

John

[attachment deleted by admin]

kevin plummer

  • Hero Member
  • *****
  • Posts: 1195
    • View Profile
    • Production Accounting and Software Payroll
Re: My first attempt at manipulating jQuery
« Reply #1 on: February 27, 2012, 02:50:04 PM »
not that I have messed with JQuery but I think your choose statement is wrong.

Try

loc:options = CHOOSE(loc:options='','',clip(loc:options) & ',' & 'autoHeight: False')

John Fligg

  • Sr. Member
  • ****
  • Posts: 361
    • View Profile
    • Ambrit Software
    • Email
Re: My first attempt at manipulating jQuery
« Reply #2 on: February 27, 2012, 02:57:37 PM »
Sorry Kevin - I copied the syntax from "the book" but this suggestion does not work either.

John

kevin plummer

  • Hero Member
  • *****
  • Posts: 1195
    • View Profile
    • Production Accounting and Software Payroll
Re: My first attempt at manipulating jQuery
« Reply #3 on: February 27, 2012, 04:55:45 PM »
Actually your initial choose statement is right. I just think you have it in the wrong place. Try the following embed:

      ! Start of "Set jQuery Accordion Options"
      ! [Priority 5000]

      ! End of "Set jQuery Accordion Options"


John Fligg

  • Sr. Member
  • ****
  • Posts: 361
    • View Profile
    • Ambrit Software
    • Email
Re: My first attempt at manipulating jQuery
« Reply #4 on: February 28, 2012, 12:17:16 AM »
I thought that was where I did have it. Tried every embed possible now but nothing works.

Sorry.

John

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: My first attempt at manipulating jQuery
« Reply #5 on: February 28, 2012, 12:28:18 AM »
take example 2 (basic with menu) - change it to the Accordion menu, and make the changes you have in mind, then post here. Use the embed Kevin suggested.

cheers
Bruce

John Fligg

  • Sr. Member
  • ****
  • Posts: 361
    • View Profile
    • Ambrit Software
    • Email
Re: My first attempt at manipulating jQuery
« Reply #6 on: February 28, 2012, 12:43:40 AM »
Bruce - here it is converted to C8. The embed Kevin suggested is the one I thought I was using. Attached the zip file and what I am seeing at run time.

Thanks

John

[attachment deleted by admin]

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: My first attempt at manipulating jQuery
« Reply #7 on: February 28, 2012, 10:13:14 PM »
so, in the spirit of teaching-a-man-to-fish (yada, yada, yada) I'm not gonna tell you what you did wrong. Rather I'll tell you how you can see what you did wrong.

Open your app in Firefox, open Firebug, and go to the Console window. JavaScript errors are reported there.
(hint: javascript is case sensitive).

Cheers
Bruce


John Fligg

  • Sr. Member
  • ****
  • Posts: 361
    • View Profile
    • Ambrit Software
    • Email
Re: My first attempt at manipulating jQuery
« Reply #8 on: February 29, 2012, 12:16:17 AM »
Thanks Bruce - and to be fair the website did show lowercase!

One good thing - I did not have Firebug installed so very useful to have found that.

Thanks.

John