jQuery UI Widgets › Forums › Dialogs and Notifications › Tooltip, Notification, Popover › On button click dynamically creating id for jqxnotification
This topic contains 4 replies, has 2 voices, and was last updated by Hristo 5 years, 12 months ago.
-
Author
-
Hi
So below provided example, show a button ‘Event 1’ that adds a notification
Events button show all the notifications that you have just added.for some reason the notification seems to multiple randomly whenever i click the ‘Event 1’ button second time. Please help whats causing this issue. The way i am creating these is that the ids are dynamically created.
Another issue i am trying to solve is how can i get the click event for the dynamically created notification. So that i can change the font-weight of the message from bold to normal.
Here is my example:
http://jsfiddle.net/8trecdyL/20/Fixed above issue. Now trying to figure out when i click the ‘Event 1’ button, how to show the notification to show on top and older ones to show below it.
The append method is causing it to put notification below one another.
Example:
Notification 2
Notification 1Example:
http://jsfiddle.net/8trecdyL/20/Hello dan123,
I would like to notice that it is not appropriate to have buttons inside the jqxNotification.
Also, I checked your source and it does not add new one notifications and they are with the sameid
.
Another important thing that could cause issues is that to create the internal widgets into theinit-
functions of the parent widgets.
About the mentioned case you could try to use for loop ‘reversed’.
Please, take a look at this topic.Best Regards,
Hristo HristovjQWidgets team
http://www.jqwidgets.comCan you able provide a workaround? Please, the for loop is causing the button to be created strangely.
Hello dan123,
I would like to suggest you try to use
.prepend()
method of the jQuery.
This could be useful in your case. Please, take a look at this topic.Best Regards,
Hristo HristovjQWidgets team
http://www.jqwidgets.com -
AuthorPosts
You must be logged in to reply to this topic.