error77
asked on
Javascript replicate existing button click in link
Hi all,
I am using JQuery Mobile DateBox plugin and it works fine.
It has a button that opens a popup which shows the calendar.
I need to create a link that will do the same thing as it's button.
Does anyone have any idea on how to do this please?
Here is a link to the demo page
http://dev.jtsage.com/jQM-DateBox/
Thanks
I am using JQuery Mobile DateBox plugin and it works fine.
It has a button that opens a popup which shows the calendar.
I need to create a link that will do the same thing as it's button.
Does anyone have any idea on how to do this please?
Here is a link to the demo page
http://dev.jtsage.com/jQM-DateBox/
Thanks
ASKER
So, how could I create a link that opens the calendar (does the same as that button) please?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Sorry, for not explaining myself properly, what I mean is. Is it possible (without changing the JS file), to add my own extra link in the page that would open that popup too?
You can, but you would need to create a section of javascript anyway. The link's called function references parent objects, meaning the link needs to be contained in the <div> tag that the JS creates. You would need to create a listener, and then create your own link.
Your link MUST BE contained in the <div> that is created. You cannot have a link elsewhere on the page.
Your link MUST BE contained in the <div> that is created. You cannot have a link elsewhere on the page.
ASKER
Thanks a lot.
Open in new window
Removed: .buttonMarkup({icon: 'grid', iconpos: 'notext', corners:true, shadow:true}) from after .appendTo(focusedEl).
That section inserts the button / icon. Put whatever you want in the $('<b>...<\/b>') part, but it must be a tag (not plain text).